0

I'm unable to run the selenium script when using below code snippet

Note: I'm using Selenium version 4

Please find the attached code snippet below Code snippet

Please find the error message snap below Error stack

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

Please find the current browser version enter image description here

Shawn
  • 4,064
  • 2
  • 11
  • 23

2 Answers2

0

You can upgrade chromedriver to version 116. This question is already answered here

In these kind of situations , I use WebDriverManager to handle driver and chrome compatibility issues. See https://github.com/bonigarcia/webdrivermanager.

0

Quick fix: Just upgrade your selenium version from v4.10.0 to v4.11.0

Issue: Since you are using chrome version 116, the compatible selenium web driver version is the latest one which is v4.11.0

If you use Maven, update your POM.xml as below:

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

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

Shawn
  • 4,064
  • 2
  • 11
  • 23