【问题标题】:Selenium chromedriver crashes (ver 94)Selenium chromedriver 崩溃(版本 94)
【发布时间】:2021-09-24 05:36:09
【问题描述】:

撕掉代码以进行故障排除

从硒导入网络驱动程序

web = webdriver.Chrome()

web.get('https://www.google.com/')

浏览器崩溃,即自行打开和关闭

Google chrome 是:版本 94.0.4606.61(官方构建)(64 位)

尝试使用不同版本的 chromedriver。现在有3个版本: https://chromedriver.chromium.org/

https://chromedriver.storage.googleapis.com/index.html?path=95.0.4638.10/ ver95:(收到确认浏览器版本的错误消息)

当前浏览器版本为 94.0.4606.54,二进制路径为 C:\Program Files\Google\Chrome\Application\chrome.exe

Ver 93 和 94:(两个版本的浏览器崩溃)

https://chromedriver.storage.googleapis.com/index.html?path=94.0.4606.41/ https://chromedriver.storage.googleapis.com/index.html?path=93.0.4577.63/

有终端消息: DevTools 监听 ws://127.0.0.1:51253/devtools/browser/832a4d53-90ec-4f5f-b106-5cc950719cb1 (尝试了一些建议,但也无法解决。)

最近有人遇到这个问题并解决了吗?

【问题讨论】:

    标签: selenium-chromedriver undetected-chromedriver


    【解决方案1】:
    Browser crashes i.e. opened and closed by itself
    

    我觉得你的这个说法没问题。既然你之后没有写任何代码

    web.get('https://www.google.com/') 
    

    行,应该是关闭浏览器。

    您可以在.get() 调用之后放置一些 time.sleep(5),它会保持静止。

    【讨论】: