1

My Chrome browser got updated to 115.0+ today and my RPAs are no longer working. I've read that past Chrome version 115 I need to start using Selenium Manager. I just upgraded to Selenium 4.10 and tried to implement the solution using this logic:

from selenium import webdriver
from selenium.webdriver.chrome.options  import Options

options = Options()
options.add_argument("start-maximized")
WebDriver driver = new ChromeDriver(options)
driver.get("https://www.google.com/")

But it's telling me that WebDriver is not defined. At this point I'm not sure what I need to install...any suggestions?

enter image description here

Jimmy Genslinger
  • 557
  • 3
  • 21

1 Answers1

1

It looks like you have typos. Try this for Python:

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

service = Service()
options = webdriver.ChromeOptions()
driver = webdriver.Chrome(service=service, options=options)
driver.get("https://www.google.com/")
# ...
driver.quit()

If the driver isn't found on your system PATH, Selenium Manager will automatically download it.


If you're wondering why you're now seeing errors for ChromeDriverManager, it's because https://chromedriver.chromium.org/downloads only goes up to version 114 due to driver restructuring by the Chromium Team for the new Chrome-for-Testing.


There's also the SeleniumBase Python selenium framework, which already has a fix for the Chrome 115 issue in the latest version: (After pip install seleniumbase, run the following with python):

from seleniumbase import Driver

driver = Driver(browser="chrome", headless=False)
# ...
driver.quit()
Michael Mintz
  • 9,007
  • 6
  • 31
  • 48
  • Changing to this method is giving me the following error: Exception has occurred:SessionNotCreatedException Message: session not created: This version of ChromeDriver only supports chrome version 110 Current browser version is 115.0.5790.99 with binary path c:\Program Files\Google\Chrome\Applicatio\chrome.exe – Jimmy Genslinger Jul 20 '23 at 17:16
  • You'll need `selenium` `4.10.0` (or newer). Which version are you running? – Michael Mintz Jul 20 '23 at 17:27
  • I just upgraded to 4.10.0 earlier this morning. Just to make sure I did it right, from my Terminal Window inside of Visual Code I typed the following command: pip install selenium==4.10.0 – Jimmy Genslinger Jul 20 '23 at 17:44
  • OK just verified that I'm on 4.10.0. And thanks for your help. I agree, it's like it's still looking for chromedriver for some reason – Jimmy Genslinger Jul 20 '23 at 17:49
  • I edited my solution to include a `seleniumbase` solution. It's a Python selenium framework that already has a fix to the Chrome 115 issue. – Michael Mintz Jul 20 '23 at 17:52
  • 1
    That did it!! Thank you so much, I truly appreciate you!! – Jimmy Genslinger Jul 20 '23 at 19:02