Skip to content

Instantly share code, notes, and snippets.

@falsetru
Created August 31, 2013 14:17
Show Gist options
  • Save falsetru/6398515 to your computer and use it in GitHub Desktop.
Save falsetru/6398515 to your computer and use it in GitHub Desktop.
test WebDriverWait
# See https://code.google.com/p/selenium/source/browse/py/selenium/webdriver/support/wait.py
from selenium import webdriver
from selenium.webdriver.support.wait import WebDriverWait
driver = webdriver.Firefox()
driver.get('http://jsfiddle.net/falsetru/M6tdQ/show/')
WebDriverWait(driver, 10).until(lambda driver: driver.find_element_by_id('status').text == 'ready')
driver.execute_script('alert("done")')
#driver.quit()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment