3

尽管使用了兼容的 google chrome 和 chromedriver 版本,但在尝试将 Selenium 与 Python 一起使用时,我仍收到此错误。会发生什么?

我正在使用: Selenium:3.141.0
Google Chrome:88.0.4324.150
Chromedriver:88.0.4324.96

当我运行时:

 driver = webdriver.Chrome(r'D:/Downloads/chromedriver')

弹出一个空白的谷歌浏览器窗口,我在控制台中打印了这个:

DevTools listening on ws://127.0.0.1:51885/devtools/browser/36b05e3e-3d85-4458-abed-bf242875e980

然后我运行:

driver.get('https://google.com')

并弹出此错误:

  Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\ProgramData\Anaconda3\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 333, in get
    self.execute(Command.GET, {'url': url})
  File "C:\ProgramData\Anaconda3\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
    self.error_handler.check_response(response)
  File "C:\ProgramData\Anaconda3\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: chrome not reachable
  (Session info: chrome=88.0.4324.150)
4

0 回答 0