m0_38001851
麻生希吃切糕
2017-12-05 03:29

selenium3.5下webdriver设置超时

  • selenium
  • 多线程

多线程下预启动webdriver时给他们设置超时时长:
this.webdriver.set_page_load_timeout(180)

结果报错如下:
this.webdriver.set_page_load_timeout(180)
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 807, in set_page_load_timeout
'type': 'page load'})
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 297, in execute
self.error_handler.check_response(response)
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/errorhandler.py", line 194, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: timeouts

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

1条回答