Home > Net >  Selenium Error: ChromeDriver only supports Chrome version 94
Selenium Error: ChromeDriver only supports Chrome version 94

Time:11-27

A few days ago I was able to run my test in selenium. I attempted to run my code today and received the following error message:

ChromeDriver was started successfully.
Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: session not created: This version of ChromeDriver only supports Chrome version 94
Current browser version is 96.0.4664.55 with binary path /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

Google chrome will open up briefly and close immediately without the actual test running. I uninstalled and reinstalled google chrome and receive the same issue. I'm currently using a mac and running my automation test using Java.

May I have some help to get pass this so I may continue working.

CodePudding user response:

This error message...

Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: session not created: This version of ChromeDriver only supports Chrome version 94
    Current browser version is 96.0.4664.55 with binary path /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

...implies that the ChromeDriver was unable to initiate/spawn a new Browsing Context i.e. Chrome Browser session.

Your main issue is the incompatibility between the version of the binaries you are using as follows:

  • You are using chrome=96.0.4664.55
  • Release Notes of ChromeDriver v96.0 clearly mentions the following :

Supports Chrome version 96

  • But you are using chromedriver=94.0
  • Release Notes of chromedriver=94.0 clearly mentions the following :

Supports Chrome version 94

So there is a clear mismatch between chromedriver=91.0 and the chrome=96.0.4664.45


Solution

Ensure that:

CodePudding user response:

Please equal your chrome and chromedriver version. Easy way to do that all the time by this Library

https://bonigarcia.dev/webdrivermanager/

Steps :

  1. Add this dependency to your pom

    <dependency>
       <groupId>io.github.bonigarcia</groupId>
       <artifactId>webdrivermanager</artifactId>
       <version>5.0.3</version>
       <scope>test</scope></dependency>
    
  2. Initialize the driver by

WebDriverManager.chromedriver().setup();

  • Related