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?
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()