java - 此版本的ChromeDriver仅支持Chrome版本114当前浏览器版本为117.0.5938.89

标签 java selenium-webdriver selenium-chromedriver selenium-java

我正在尝试执行 Java selenium 测试。

预期结果:浏览器 session 启动并执行测试步骤。

当前行为:浏览器 session 未启动,并出现错误:

org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: session not created: This version of ChromeDriver only supports Chrome version 114
Current browser version is 117.0.5938.89 with binary path C:\Program Files (x86)\Google\Chrome\Application\chrome.exe 

chrome 从 116 版本更新到 117 版本后,我收到以下错误:

org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: session not created: This version of ChromeDriver only supports Chrome version 114
Current browser version is 117.0.5938.89 with binary path C:\Program Files (x86)\Google\Chrome\Application\chrome.exe 

在我的 pom.xml 文件中,我有:

webdriver-manager 5.5.3

selenium-java 4.12.1

最佳答案

为了解决这个问题,我使用了这个链接 (Chrome for Testing availability)并根据我的操作系统检查了chromedriver。 不要忘记确认并在必要时调整 chromedriver 的环境变量。

Chrome > 版本 117.0.5938.132 Chrome 驱动程序 > Download Link

希望对您有所帮助。

关于java - 此版本的ChromeDriver仅支持Chrome版本114当前浏览器版本为117.0.5938.89,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/77148932/

相关文章:

java - Selenium 获取文本

electron - 错误: ChromeDriver did not start within 5000ms

java - Selenium chromedriver 禁用日志记录或将其重定向 java

java - 如何在其他方法中使用一个方法中产生的变量?

java - 如何解决 htmlUnit WrapsDriver 错误

python - 在 Python 中运行基本的 Selenium 脚本时为 "Firefox quit unexpectedly."

java - 警报在 chrome 中不起作用,但在 firefox 中起作用

java - 日期数据结构的 Joda 等价物

java - 正则表达式提取链接内容

java - 每个组的MySQL行号与组内存