如何在Python中设置SeleniumWebDriver上的脚本超时?
中的Java有三种超时函数:如何在Python中设置SeleniumWebDriver上的脚本超时?,python,selenium,selenium-webdriver,Python,Selenium,Selenium Webdriver,中的Java有三种超时函数: 迫切地等待 页面加载超时 设置脚本超时 我正试图查找与第三个类似的python,但找不到它。下面是前两个的python等价物 隐式等待(10) 设置页面加载超时(20) 这就是你想要的吗: set_script_timeout(time_to_wait) Set the amount of time that the script should wait during an execute_async_script call before
这就是你想要的吗:
set_script_timeout(time_to_wait)
Set the amount of time that the script should wait during an
execute_async_script call before throwing an error.
Args :
time_to_wait: The amount of time to wait (in seconds)
Usage :
driver.set_script_timeout(30)
参考-