Skip to content

Instantly share code, notes, and snippets.

@weissjeffm
Created December 10, 2013 19:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save weissjeffm/7897083 to your computer and use it in GitHub Desktop.
Save weissjeffm/7897083 to your computer and use it in GitHub Desktop.
def is_displayed(loc):
try:
return element(loc).is_displayed()
except NoSuchElementException:
return False
def wait_for_element(loc):
wait_until(lambda s: is_displayed(loc), "Element '{}' did not appear as expected.".format(loc))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment