![](/img/trans.png)
[英]Selenium: Chrome failed to start: exited abnormally. DevToolsActivePort file doesn't exist
[英]Selenium/chrome driver keeps crashing "Chrome failed to start: exited normally" and "DevToolsActivePort file doesn't exist"
我正在尝试为 selenium/chromedrive 运行我的脚本,但不断收到以下错误。
Selenium ver 4.72 Chrome 浏览器版本:Version 108.0.5359.125 (Official Build) (64-bit) ChromeDriver 版本:ChromeDriver 108.0.5359.71
消息:未知错误:Chrome 无法启动:正常退出。 (未知错误:DevToolsActivePort 文件不存在)
脚本:从 selenium 从 selenium.webdriver.common.keys 导入 webdriver 从 selenium.webdriver.common.by 导入密钥 从 selenium.webdriver.chrome.options 从 selenium.webdriver.chrome.options 导入选项 从 selenium.webdrive 选项导入选项(chrome.webdrive 选项) options.binary_location = "C:/Program Files/Google/Chrome/Application/chrome.exe"
options.add_argument("--no-sandbox") s = Service(executable_path=r'C:/Bin/chromedriver.exe') driver = webdriver.Chrome(service=s, options=options) driver.get("https ://www.walmart.com")
谢谢你的帮助
我也尝试过 Selenium 经理,但效果不佳。 我束手无策
我想这可能是因为我的 chrome 安装在 Application 文件夹而不是 user/appdata 中? 不太确定。 Chrome 的默认位置是什么? 我试过卸载 chrome/and appdata 并重新安装,但它让我回到了那个文件夹。
根据这个线程,最新的 chromedriver 似乎有一个错误: https://groups.google.com/g/chromedriver-users/c/wYA8JQB7l0A
尝试以无头模式运行,它会正常旋转。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.