How to set Selenium Python WebDriver default timeout?

Posted 清明-心若淡定

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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)

 

以上是关于How to set Selenium Python WebDriver default timeout?的主要内容,如果未能解决你的问题,请参考以下文章

[Selenium+Java] How to Use Selenium with Python: Complete Tutorial

[Selenium+Java] How to Take Screenshot in Selenium WebDriver

[Selenium+Java] How to use IntelliJ IDEA & Selenium Webdriver

[Selenium+Java] How to Upload & Download a File using Selenium Webdriver

How to click on a point on an HTML5 canvas in Python selenium webdriver

[转]SQL - Create XML - How to set Unicode UTF-8