且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何设置PhantomJS的超时时间?

更新时间:2023-02-26 17:43:14

您可以像下面的Firefox驱动程序示例那样为Driver设置超时,而不是针对phantomjs资源超时:

instead of targeting phantomjs resource timeout, you can set a timeout for Driver like below example of Firefox driver:

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

您可以将30更改为任意数字

you can change 30 to any numeric

谢谢