A window appears after launch and immediately disappears, I can not understand what's wrong. Google except for the latest version, selenium is also set to the LATEST parameter (nothing changes with a specific version).
Error:
org.openqa.selenium.SessionNotCreatedException: Message: Could not start a new session. Response code 500. Message: session not created
Code:
Error:
更新你的chromedriver版本,看来你的浏览器和浏览器当前驱动版本不一样。
https://chromedriver.storage.googleapis.com/index.html?
This error message...
org.openqa.selenium.SessionNotCreatedException: Message: Could not start a new session. Response code 500. Message: session not created:
.
Driver info: org.openqa.selenium.chrome.ChromeDriver
...implies that the ChromeDriver was unable to initiate/spawn a new Browsing Context ie google-chrome session.
Your main issue is the incompatibility between the version of the binaries you are using as follows:
Supports Chrome version 99
Driver info: org.openqa.selenium.chrome.ChromeDriver
So most possibly there is a mismatch between jdk version , chromedriver version and the chrome=99.0
Ensure that:
总之,出现这样的问题需要安装之前版本的web驱动
If some one is on linux,
some distros install /usr/bin/google-chrome-stable, web driver manager tries to retry the version of chrome with the command
/usr/bin/google-chrome --version
Since that bin does not exists, is going to fail; The solution is very simple just a simbolic link to google-chrome
# ln -s /usr/bin/google-chrome-stable /usr/bin/google-chrome
More than an answer this continues with the question.
I'm using serenity-bdd with the following characteristics:
And the generated message error is:
<<< ERROR..net.thucydides.core.webdriver:DriverConfigurationError. Could not instantiate class org.openqa.selenium.chrome:ChromeDriver Caused by..net.thucydides.core.webdriver:DriverConfigurationError. Could not instantiate new WebDriver instance of type class org.openqa.selenium.chrome.ChromeDriver (Could not start a new session. Response code 500: Message: unknown error: Chrome failed to start. exited abnormally: (unknown error, DevToolsActivePort file doesn't exist) (The process started from chrome location /usr/bin/google-chrome is no longer running. so ChromeDriver is assuming that Chrome has crashed.)
Was trying with different driver combinations and none of them are working. Funny enough when i run on windows with the same configuration all works.
Starting ChromeDriver 109.0.5414.74 (e7c5703604daa9cc128ccf5a5d3e993513758913-refs/branch-heads/5414@{#1172}) on port 48484 Only local connections are allowed. Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe. ChromeDriver was started successfully. Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: unknown error: Failed to create Chrome process. Host info: host: 'A-LAPTOP', ip: '192. .0. ' Build info: version: '4.7.2', revision: '4d4020c3b7' System info: os.name: 'Windows 11', os.arch: 'amd64', os.version: '10.0', java.version: '17.0.5' Driver info: org.openqa.selenium.chrome.ChromeDriver Command: [null, newSession {capabilities=[Capabilities {browserName: chrome, goog:chromeOptions: {args: [], extensions: []}}], desiredCapabilities=Capabilities {browserName: chrome, goog:chromeOptions: {args: [], extensions: []}}}] at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:148) at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:106) at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:67) at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:156) at org.openqa.selenium.remote.service.DriverCommandExecutor.invokeExecute(DriverCommandExecutor.java:167) at o rg.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:142) at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:535) at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:228) at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:156) at org.openqa.selenium.chromium.ChromiumDriver.(ChromiumDriver.java:101) at org.openqa.selenium.chrome.ChromeDriver.(ChromeDriver.java:82) at org.openqa.selenium.chrome.ChromeDriver.(ChromeDriver.java:50) at com.project.skyfall.Browser_Drivers.main(Browser_Drivers.java:13)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.