java Chrome 驱动程序停止使用最新的 Chrome 驱动程序 2.24 对 Chrome 浏览器版本 54 工作
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/40240299/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Chrome driver stopped working for Chrome browser version 54 with the latest Chrome driver 2.24
提问by Kireeti Annamaraj
Today the latest build for chrome browser version got installed automatically which is now 54.0.2840.71 m (64-bit). I am unable to drive the browser using the latest Chrome driver 2.24 with any version of Selenium. Help me solve this issue..?
今天,Chrome 浏览器版本的最新版本已自动安装,现在是 54.0.2840.71 m(64 位)。我无法在任何版本的 Selenium 上使用最新的 Chrome 驱动程序 2.24 来驱动浏览器。帮我解决这个问题..?
采纳答案by Kireeti Annamaraj
Hi I have fixed the issue. Chrome version 54 and below are compatible with the Chrome driver 2.24 and the Chrome versions above 54 need Chrome driver 2.27.
嗨,我已经解决了这个问题。Chrome 54 及以下版本兼容 Chrome 驱动程序 2.24,Chrome 54 以上版本需要 Chrome 驱动程序 2.27。
回答by jibbs
I have the exact same problem. The only solution I know of (for now) is to revert back to the previous version of Chrome before the update... if possible. Thankfully I had one machine that had the chrome.exe version I needed as the updated VMs had blown it away.
我有完全一样的问题。我所知道的(目前)唯一的解决方案是在更新之前恢复到以前版本的 Chrome……如果可能的话。谢天谢地,我有一台机器有我需要的 chrome.exe 版本,因为更新的虚拟机已经把它吹走了。
This helped me: https://productforums.google.com/forum/#!msg/chrome/UFSYuIr1-80/DivHmlqPDAAJ
这对我有帮助:https: //productforums.google.com/forum/#!msg/chrome/ UFSYuIr1-80/DivHmlqPDAAJ
However I did not have "old_chrome.exe" in the folder. I had the old version directory but the old corresponding exe was gone. If I had not found it on an un-updated PC I would have been screwed.
但是我的文件夹中没有“old_chrome.exe”。我有旧版本的目录,但旧的相应 exe 不见了。如果我没有在未更新的 PC 上找到它,我就会被搞砸。
Edit:I also turned off all Chrome updates so I can control them from now on: https://stackoverflow.com/a/31939624/2246511
编辑:我还关闭了所有 Chrome 更新,以便从现在开始控制它们:https: //stackoverflow.com/a/31939624/2246511
回答by Adam Bilinski
You could get the latest chromedriver (2.25) from: https://sites.google.com/a/chromium.org/chromedriver/downloads
您可以从以下位置获取最新的 chromedriver (2.25):https: //sites.google.com/a/chromium.org/chromedriver/downloads
That has fixed the problem for me.
这已经解决了我的问题。
回答by Ondra ?i?ka
The whole chain needs to be aliged to version which support what they control: Selenium -> Selenium Chrome Driver -> ChromeDriver -> Chrome.
整个链需要与支持它们控制的版本保持一致:Selenium -> Selenium Chrome Driver -> ChromeDriver -> Chrome。
Regarding Chrome Driver:
关于 Chrome 驱动程序:
See the other answers for traditional installation.
请参阅传统安装的其他答案。
For Apple / MacOS with Brew, you need to:
对于带有 Brew 的 Apple / MacOS,您需要:
- Open chrome, go to Chrome -> About Chrome -> check if there is a prompt to restart chrome to start using the new version.
Upgrade ChromeDriver through brew:
brew cask upgrade chromedriver
- 打开chrome,进入Chrome->关于Chrome->查看是否有重启chrome开始使用新版本的提示。
通过 brew 升级 ChromeDriver:
brew cask upgrade chromedriver
The version of chromedriver
is nowadays aligned with Chrome, so Chrome 80 comes with ChromeDriver 80. It seems to appear in Brew very soon after Chrome.
的版本 chromedriver
现在与 Chrome 对齐,因此 Chrome 80 附带了 ChromeDriver 80。它似乎在 Chrome 之后很快就会出现在 Brew 中。
Regarding Selenium ChromeDriver: Don't forget to upgrade to the latest version of selenium-chrome-driver(along with the rest of Selenium deps) which knows how to operate the latest ChromeDriver.
关于 Selenium ChromeDriver:不要忘记升级到最新版本的selenium-chrome-driver(连同 Selenium deps 的其余部分),它知道如何操作最新的 ChromeDriver。