Skip to content

Add expected condition that waits for all found elements to be visible - #3532

Merged
lmtierney merged 3 commits into
SeleniumHQ:masterfrom
BeyondEvil:jimboslice
Apr 19, 2017
Merged

Add expected condition that waits for all found elements to be visible#3532
lmtierney merged 3 commits into
SeleniumHQ:masterfrom
BeyondEvil:jimboslice

Conversation

@BeyondEvil

Copy link
Copy Markdown
Contributor

@lmtierney lmtierney added the C-py Python Bindings label Feb 20, 2017

@isaulv isaulv Feb 20, 2017

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.

I would write this as:

if  _element_if_visible(element, visibility=False):
    return False

instead of raising an exception.

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.

Thanks, @Dude-x, that makes sense! I've changed it locally. Can I merge it with this PR? If so, how?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@BeyondEvil just push your changes to the same remote branch again... the PR will get updated automagically.

@cgoldberg

Copy link
Copy Markdown
Member

@BeyondEvil you should rebase before pushing so your PR doesn't contain unrelated commits

@BeyondEvil

Copy link
Copy Markdown
Contributor Author

@cgoldberg Yeah, I don't know what I'm doing lol ^^ But I got some help from the kind folks in IRC to fix it :)

from selenium.common.exceptions import StaleElementReferenceException
from selenium.common.exceptions import WebDriverException
from selenium.common.exceptions import NoAlertPresentException
from selenium.common.exceptions import ElementNotVisibleException

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.

Is this an oversight for some code in the body?

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.

@Dude-x Yes, I'll remove that (it was used by the first revision of this PR).

@lmtierney
lmtierney merged commit c5fec8c into SeleniumHQ:master Apr 19, 2017
@BeyondEvil
BeyondEvil deleted the jimboslice branch April 19, 2017 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-py Python Bindings

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants