0

Hi I am using Selenium on Windows 10, since 2 days I keep getting the following error initially I did not have this error

WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://chromedriver.chromium.org/home

Maybe due to an update Google Chrome Version 115.0.5790.110

I tried one of Stackoverflow's suggested solutions, but it didn't work

driver = webdriver.Chrome(service=Service(ChromeDriverManager().install()), options=options)

Chrome Version 115.0.5790.110

Shawn
  • 4,064
  • 2
  • 11
  • 23
simo001
  • 1
  • 1

1 Answers1

0

Chromium team have made some recent changes to chromedriver. The last stable version is v114. From v115 they are going to release 2 different browsers, one for regular browsing and one dedicated for automation testing.

Source:

Solution: For now you try one of the follwoing:

  1. Force ChromeDriverManager to use v114 as below:
driver = webdriver.Chrome(service=Service(ChromeDriverManager(version="114.0.5735.90").install()),options=options)
  1. Looks like you are using old version of Selenium. Just upgrade selenium to your latest version. If your selenium version is v4.6.0 or above, you don't need to set driver path nor you need third party library like WebDriverManager to handle browser drivers. Selenium's new tool SeleniumManager will internally handle browser drivers, code can be as simple as:
from selenium import webdriver

driver = webdriver.Chrome()
driver.get("https://www.google.com/")

Source: Introducing Selenium Manager

Useful links - https://stackoverflow.com/a/76799299/7598774

Shawn
  • 4,064
  • 2
  • 11
  • 23