Google Colab WebDriverException中的错误:消息:未知错误:Chrome启动失败:异常退出

mzmfm0qo  于 11个月前  发布在  Go
关注(0)|答案(1)|浏览(213)
driver = webdriver.Chrome("/usr/lib/chromium-browser/chromedriver")

WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally.
  (unknown error: DevToolsActivePort file doesn't exist)
  (The process started from chrome location /usr/bin/chromium-browser is no longer running, so ChromeDriver is assuming that Chrome has crashed.)

字符串
selenium 和Chrome驱动程序都是最新的。我不明白为什么会发生这个错误。

lx0bsm1f

lx0bsm1f1#

您可以使用Google-Colab-Selenium

!pip install google-colab-selenium

字符串
你可以这样使用Selenium:

import google_colab_selenium as gs

driver = gs.Chrome()

driver.get('https://www.google.com')
print(driver.title)
driver.quit()

相关问题