How to set Selenium Python WebDriver default timeout?

Trying to find a good way to set a maximum time limit for command execution latency in Selenium Python WebDriver. Ideally, something like:

ff = webdriver.Firefox()
ff.implicitly_wait(10) # seconds
ff.get("http://somedomain/url_that_delays_loading")
myDynamicElement = ff.find_element_by_id("myDynamicElement")

or 

driver= webdriver.Firefox()
driver.set_page_load_timeout(30)

 

posted on 2016-03-09 09:47  清明-心若淡定  阅读(596)  评论(0编辑  收藏  举报