Solved version of ChromeDriver only supports Chrome version 98

In this post we are going to solve the issue Selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 98 Current browser version is 101.0.4951.54 with a binary path with examples. To solve this problem we have to install chrome driver with the help of “webdrive-manager” by using the command “pip install webdriver-manager” and use it for different web browsers.

We need to Use the same ChromeDriver and Chrome Browser Versions. This Error only Occurs because of the mismatch between the Chrome browser and the chrome WebDriver Versions. To avoid this problem Chrome Brower should be up to date with ChromeDriver.

1. Manually Solve given Problem


  • Open Chrome browser and type in the address bar chrome://version/ to check for compatible chrome driver version as per Browser version.
  • Now we can Download chromedriver from the official website.
  • Pass correct path in your IDE and run code.

2. By using webdrive-manager


The next approach is to use the web driver manager in the program by using the following code. To solve this problem we have to install chrome driver with the help of “webdrive-manager” by using the command “pip install webdriver-manager” and use it for different web browsers.

from selenium import webdriver
from webdriver_manager.chrome import ChromeDriverManager
driver = webdriver.Chrome(ChromeDriverManager().install())
driver.get("https://www.python.org")
print(driver.title)
driver.close()

3. By using chromedriver-autoinstaller


To solve this problem we have to install chromedriver-autoinstaller by using the command “pip install chromedriver-autoinstaller”. The “chromedriver-autoinstaller -Automatically download and install chromedriver that supports the currently installed version of chrome. This installer supports Linux, macOS, and Windows operating systems.”

from selenium import webdriver
import chromedriver_autoinstaller


chromedriver_autoinstaller.install()
driver.get("https://www.python.org")
print(driver.title)

driver.close()

Summary

In this post we are going to learn,Solved version of ChromeDriver only supports Chrome version 98.