Python+Selenium運行報錯call function result missing 'value',或瀏覽器打開空白提示DataXXX

報錯信息如下:

Traceback (most recent call last):
  File "test.py", line 62, in <module>
    basePage.login()
  File "../common.py", line 206, in login
    self.driver.set_window_size(width, height)
  File "/home/liuhong/.local/lib/python3.5/site-packages/selenium/webdriver/remote/webdriver.py", line 1095, in set_window_size
    'windowHandle': windowHandle})
  File "/home/liuhong/.local/lib/python3.5/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
    self.error_handler.check_response(response)
  File "/home/liuhong/.local/lib/python3.5/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: call function result missing 'value'
  (Session info: chrome=74.0.3729.169)
  (Driver info: chromedriver=2.26.436382 (70eb799287ce4c2208441fc057053a5b07ceabac),platform=Linux 4.10.0-28-generic x86_64)

問題原因:Chrome跟ChromeDriver版本不兼容

解決方法:

參考https://blog.csdn.net/BinGISer/article/details/88559532更新對應的ChromeDriver 版本

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章