无法使用硒在Mac上启动Chrome浏览器

我无法使用硒在Mac上启动Chrome浏览器。

我有以下配置:

  

Mac OS X 10.14.6

     

Chrome版本:78.0.3904.97

     

ChromeDriver 78.0.3904.70(从https://chromedriver.chromium.org/downloads下载)

     

Python 3

我尝试了this博客中提到的步骤来设置chromedriver并使用简单的浏览器启动代码

from selenium import webdriver

driver = webdriver.Chrome()
driver.get('https://www.google.com')

不幸的是,我遇到以下错误:

  

selenium.common.exceptions.WebDriverException:消息:未知错误:   Chrome无法启动:崩溃(未知错误:DevToolsactivePort   文件不存在)(该过程从Chrome位置开始   / Applications / Google Chrome.app/Contents/MacOS/Google Chrome不是   更长的运行时间,因此ChromeDriver认为Chrome崩溃了。)

这些解决方案中没有一个对我有用

Selenium: WebDriverException:Chrome failed to start: crashed as google-chrome is no longer running so ChromeDriver is assuming that Chrome has crashed

无法使用硒在Mac上启动Chrome浏览器

redrex5 回答:无法使用硒在Mac上启动Chrome浏览器

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3145648.html

大家都在问