Chrome SessionNotCreatedException:无法启动新会话

7cjasjjr  于 2023-09-28  发布在  Go
关注(0)|答案(1)|浏览(388)

我需要解决这个问题。我从过去的三天里面对这个问题。

Aug 23, 2023 9:51:48 PM org.openqa.selenium.remote.service.DriverService$Builder getLogOutput
INFO: Driver logs no longer sent to console by default; https://www.selenium.dev/documentation/webdriver/drivers/service/#setting-log-output
Exception in thread "main" 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 116.0.5845.97 with binary path C:\Program Files\Google\Chrome\Application\chrome.exe 
Host info: host: 'DESKTOP-2CR94PT', ip: '192.168.176.203'
Build info: version: '4.10.0', revision: 'c14d967899'
System info: os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '20.0.1'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Command: [null, newSession {capabilities=[Capabilities {browserName: chrome, goog:chromeOptions: {args: [--remote-allow-origins=*], extensions: []}}]}]
    at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:140)
    at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:96)
    at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:68)
    at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:163)
    at org.openqa.selenium.remote.service.DriverCommandExecutor.invokeExecute(DriverCommandExecutor.java:196)
    at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:171)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:531)
    at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:227)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:154)
    at org.openqa.selenium.chromium.ChromiumDriver.<init>(ChromiumDriver.java:107)
    at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:87)
    at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:82)
    at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:50)
    at test.Seleniumscript.main(Seleniumscript.java:14)
8oomwypt

8oomwypt1#

**快速修复:**只需将您的 selenium 版本从v4.10.0升级到v4.11.0
**问题:**由于您使用的是Chrome版本116,因此兼容的selenium web驱动程序版本是最新的v4.11.0

https://stackoverflow.com/a/76912466/7598774

相关问题