Search code examples
selenium-webdriverselenium-chromedriver

Getting org.openqa.selenium.SessionNotCreatedException with chrome version 120


I'm getting the below exception:

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 120.0.6099.217 with binary path C:\Program Files\Google\Chrome\Application\chrome.exe 

Tried below solutions:

  1. Updated the s4lj dependency
  2. bonigarcia: Tried different maven versions
  3. Updated the chromedriver.exe file

Solution

  • The exception which you are getting is telling you that, the chromedriver.exe which you are using in your code works with Chrome version 114. However, the Chrome version installed in your system is v120.

    Solution: You need to download the latest chromedriver.exe from the new Chrome for testing Dashboard. And then use that .exe file to set your driver path.

    Use below link to download chromedriver.exe for Chrome version 120

    Link to download latest stable chrome driver

    As an alternate solution, you can utilise latest selenium's tool which is known as Selenium Manager. Using this, you no longer need to download and set the chrome driver path manually. Selenium will internally handle the browser driver for you. For more info, refer below answers: