Reputation: 13
In my project where I write web automation tests using Selenium web driver, I am experiencing version problems after every new Chrome update. Chrome updates happen very frequently and I get this error again and again due to version incompatibility almost periodically. I think Chrome updates the driver of the current browser later and my tests are not running during this time.
The error message I received is;
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.57 with binary path /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
Do you have any permanent solution suggestions for this problem?
I turned off Chrome updates, I expect this to be a solution in the future. However, since I cannot find the appropriate version of Maven plugins at the moment, my tests are not working.
Upvotes: 1
Views: 715
Reputation: 41
Upgrade your selenium library version to 4. Now selenium will automatically take care of using Chrome Driver based on browser version.
Maven dependency for the Latest version is:
`<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>4.18.1</version>
</dependency>`
Upvotes: 0
Reputation: 5214
If you want to use WebdriverManager you should update the version to the latest (5.6.4)
<dependency>
<groupId>io.github.bonigarcia</groupId>
<artifactId>webdrivermanager</artifactId>
<version>5.6.4</version>
</dependency>
Also make sure to clear the local cache:
WebDriverManager.chromedriver().clearDriverCache().setup();
Upvotes: 0