Selenium Error: Which webdrivermanager version supports chrome version 121?

5.3k Views Asked by At

Currently I'm using 5.5.2 version of webdrivermanager. Getting the below error

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 121.0.6167.184 with binary path /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

build.gradle

implementation group: 'org.seleniumhq.selenium', name: 'selenium-java', version: '4.4.2'
implementation group: 'io.github.bonigarcia', name: 'webdrivermanager', version: '5.5.2'

which version of webdrivermanager supports chrome version 121?

6

There are 6 best solutions below

9
sashkins On

I've resolved the same issue by updating wdm to the latest version available for now - 5.6.3

2
code_akash On

You will have to clear cache from ~/.cache/selenium.

  1. Use latest version of Selenium and WDM
  2. Navigate to above directory and remove cached chromedriver and resolution.properties. You can even check before deleting resolution.properties and you might see chrome121 key value pointing to 114 version.
  3. Run your tests again.

This is how your resolution.properties will look after above steps:

#WebDriverManager Resolution Cache
#Mon Feb 19 10:39:15 CET 2024
chrome=121
chrome-ttl=11\:39\:15 19/02/2024 CET
chrome121=121.0.6167.184
chrome121-ttl=10\:39\:15 20/02/2024 CET 

It should work.

0
Akzy On

To resolve the issue with the version of ChromeDriver not supporting the current Chrome version (121.0.6167.184), you should use WebDriverManager version 5.6.0 or higher, as it supports ChromeDriver version 121.

  • Remove the current WebDriverManager dependency from your build.gradle file.
  • Add the latest WebDriverManager dependency:

:

implementation group: 'io.github.bonigarcia', name: 'webdrivermanager', version: '5.6.0'
  • Run your build script to update the dependencies.
  • Verify that the updated WebDriverManager is in your project's dependencies
2
Marc On

This is happening because the older version of WebDriverManager is incorrectly resolving the current (Feb 2024) ChromeDriver download URL to https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/121.0.6167.184/win64/chromedriver-win64.zip

You can manually work around it it by downloading the latest stable Chromedriver to the correct directory (e.g. [your WDM path]\chromedriver\win64\121.0.6167.85) and then deleting resolution.properties

However, the permanent fix is to update your WDM to the latest version (or at least v5.5.3 as this changes where the ChromeDriver repo is) - it will then work correctly, but you must delete [your WDM path]\resolution.properties before the next run, as it will have cached the incorrect version

0
Mohit Kumar Verma On

Use latest WebDriverManager version 5.7.0 without scope tag. If still facing some issue please add scope tag to test in maven WebDriverManager 5.7.0 dependency.

0
Salim Essouidi On

I resolved the issue by manually adding an exact version of Chromedriver using WebDriverManager:

WebDriverManager.chromedriver().browserVersion("your-chromedriver-version").setup();

Replace "your-chromedriver-version" with the specific version of Chromedriver you want to use. For example, my Chrome browser version is 122.0.6261.70:

WebDriverManager.chromedriver().browserVersion("122.0.6261.69").setup(); WebDriver driver = new ChromeDriver();

This way, WebDriverManager will download and set up the specified version of Chromedriver for you. Ensure that you use a version compatible with your Chrome browser version. You can check the Chromedriver releases page (https://sites.google.com/chromium.org/driver/) for the available versions.

Hope this helps!

UPDATE: For some reason, it works now without specifying the Chrome version : WebDriverManager.chromedriver().setup(); WebDriver driver = new ChromeDriver();