Skip to content

ElementProxy enhancements and fix for #65#78

Merged
dtognazzini merged 4 commits intomasterfrom
fixElementProxyNotPresent
Oct 4, 2014
Merged

ElementProxy enhancements and fix for #65#78
dtognazzini merged 4 commits intomasterfrom
fixElementProxyNotPresent

Conversation

@dtognazzini
Copy link
Copy Markdown
Contributor

New methods:
wait_for_absence(timeout = nil)
wait_for_presence(timeout = nil)

Fix for #65

Comment thread lib/ae_page_objects/element_proxy.rb Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe use is_absent to keep the naming consistent?

@ipmsteven
Copy link
Copy Markdown
Contributor

do we need require 'timeout' at the top of element_proxy.rb

@dtognazzini
Copy link
Copy Markdown
Contributor Author

No. Good catch. I'll remove.

@dtognazzini dtognazzini force-pushed the fixElementProxyNotPresent branch from da111f0 to 2f4284f Compare October 4, 2014 00:31
dtognazzini added a commit that referenced this pull request Oct 4, 2014
@dtognazzini dtognazzini merged commit 941181d into master Oct 4, 2014
@dtognazzini dtognazzini deleted the fixElementProxyNotPresent branch October 4, 2014 01:08
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the load_element is succeed, the check_absece method will return false. However in the Waiter.wait_for the check_absence will called again and again until the time expired. I think we should return false and skip the wait_for if the load_element is succeed.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand. check_absence should only return true if loading the element failed, which indicates the element is absent. If loading the element succeeds, then the element is still present. We want to wait for the element to be absent.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh yes I got it. Thanks @dtognazzini 😁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants