Selenium-Could not start a new session. Response code 500. Message: session not created

119 views Asked by At

I am receiving below exception when running my testng.xml

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 122.0.6261.129 with binary path C:\Program Files\Google\Chrome\Application\chrome.exe 
Host info: host: 'DESKTOP-KRU33EQ', ip: '192.168.1.4'
Build info: version: '4.15.0', revision: '1d14b5521b'
System info: os.name: 'Windows 11', os.arch: 'amd64', os.version: '10.0', java.version: '17.0.10'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Command: [null, newSession {capabilities=[Capabilities {browserName: chrome, goog:chromeOptions: {args: [], extensions: []}}]}]

I tried with various selenium-java versions and webdrivermanager versions, but I am getting the same error.

<dependency>
    <groupId>org.seleniumhq.selenium</groupId>
    <artifactId>selenium-java</artifactId>
    <version>4.15.0</version>
</dependency>

<dependency>
    <groupId>io.github.bonigarcia</groupId>
    <artifactId>webdrivermanager</artifactId>
    <version>5.6.0</version>
</dependency>
1

There are 1 answers

0
Sanady_ On

You should check your current Chrome version, afterward go to the page https://googlechromelabs.github.io/chrome-for-testing/ and download the right version of Chrome driver according to the Chrome version. Because one without the other does not work.