Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ChromeDriver is outdated, how do i update it?

Im currently learning Selenium automation with python and im using chromedriver. Im having an issue running this simple script:

from selenium import webdriver
from selenium.webdriver.chrome.service import Service

options = webdriver.ChromeOptions()
options.add_experimental_option("detach", True)
driver = webdriver.Chrome(options=options,service=Service(executable_path = 'C:/Users/{UserName}/Downloads/chromedriver-win64/chromedriver-win64'))
driver.get("https://google.com")

The error i receive is

selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 114 Current browser version is 118.0.5993.89 with binary path C:\Program Files\Google\Chrome\Application\chrome.exe

How do i resolve this? many thanks!

like image 214
Mr_Shoryuken Avatar asked Sep 21 '25 04:09

Mr_Shoryuken


2 Answers

This may or may not apply to your environment, but brew upgrade chromedriver did the trick for me.

like image 130
Beer Me Avatar answered Sep 22 '25 16:09

Beer Me


  1. To find the old chromedriver, first you open (mine is window) cmd and run chromedriver.exe.
  2. Then you go to Task Manager by press Ctrl + Shift + Esc keys.
  3. Then go to Processes (you might need to click on your user if your machine has more than one user).
  4. Find the process "chromedriver", right click and select Open File Location.
  5. Now you will see the real location of the old file. Just delete it and replace by the new file.
like image 27
Dany Do Avatar answered Sep 22 '25 18:09

Dany Do