17

I recently updated my Google Chrome browser to version 115.0.5790.99 and I'm using Python webdrivermanager library (version 3.8.6) for Chrome driver management.

However, since this update, when I call the ChromeDriverManager().install() function, I encounter the following error:

There is no such driver by URL https://chromedriver.storage.googleapis.com/LATEST_RELEASE_115.0.5790

Steps to reproduce the issue:

  • Update Google Chrome to version 115.0.5790.99.

Execute the following Python code:

from webdriver_manager.chrome import ChromeDriverManager

driver_path = ChromeDriverManager().install()

capture:

exception catched

TylerH
  • 20,799
  • 66
  • 75
  • 101
Christian Rubio
  • 173
  • 1
  • 1
  • 8

10 Answers10

20

Selenium Manager is now fully included with Selenium 4.10.0, so this is all you need:

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

service = Service()
options = webdriver.ChromeOptions()
driver = webdriver.Chrome(service=service, options=options)
# ...
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 this error 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.

TylerH
  • 20,799
  • 66
  • 75
  • 101
Michael Mintz
  • 9,007
  • 6
  • 31
  • 48
  • I am triying to use this solution, but now i am having this error: missing 1 required positional argument: 'executable_path' – alejomarchan Jul 24 '23 at 15:00
  • 1
    @alejomarchan you have to upgrade to selenium >= `4.10.0`. `executable_path` was moved to `Service`. To set it in the new version , use `service=Service(executable_path='./chromedriver.exe')` (update the executable_path as needed). – Michael Mintz Jul 24 '23 at 15:05
  • ``selenium`` just released version ``4.11.2`` for Python with support for newer chromedrivers. Be sure to upgrade before Chrome 116 comes out to avoid errors. – Michael Mintz Aug 01 '23 at 12:33
  • @MichaelMintz, I am using framework which enforces me to use 3.xx.x selenium only. how to achieve this in that case? – Jake Aug 04 '23 at 09:23
5

Selenium Manager

With the availability of Selenium v4.6 and above you don't need to explicitly download ChromeDriver, GeckoDriver or any browser drivers as such using webdriver_manager. You just need to ensure that the desired browser client i.e. , or is installed.

Selenium Manager is the new tool integrated with that would help to get a working environment to run Selenium out of the box. Beta 1 of Selenium Manager will configure the browser drivers for Chrome, Firefox, and Edge if they are not present on the PATH.


Solution

As a solution you can simply do:

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

options = Options()
options.add_argument("start-maximized")
driver = webdriver.Chrome(options=options)
driver.get("https://www.google.com/")
SecorD
  • 7
  • 3
undetected Selenium
  • 183,867
  • 41
  • 278
  • 352
  • I'm having the same issue and trying to implement your solution but am getting an error on the WebDriver driver line. My old code setup was: from selenium.webdriver import ActionChains from selenium.webdriver.chrome.options import Options from selenium.webdriver.chrome.service import Service browser = webdriver.Chrome(service=Service(ChromeDriverManager().install()), options=op) browser.create_options() – Jimmy Genslinger Jul 20 '23 at 16:06
3

Workaround

Pass a version parameter to ChromeDriverManager.

Example

s = Service(ChromeDriverManager(version="114.0.5735.90").install())

Source

Patrick
  • 99
  • 2
  • 3
3

You just need to update the webdriver_manager to latest version using the follow command:

pip install --upgrade webdriver_maanager
moken
  • 3,227
  • 8
  • 13
  • 23
  • Answer needs supporting information Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](https://stackoverflow.com/help/how-to-answer). – moken Aug 03 '23 at 07:50
  • pip install --upgrade webdriver_manager worked for me. – GuitarViking Aug 10 '23 at 04:30
  • @Gabriel Hayden , thanks for this, this worked, but you need to correct the spelling of "maanager" to "manager" – Calculate Aug 30 '23 at 16:27
1

As of version 4.10.0 of Selenium, Selenium Manager is now fully integrated, making its setup and usage easier.

The following Python code demonstrates how to use Selenium WebDriver, specifically the driver for the Google Chrome browser:

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

# The Service class is used to start an instance of the Chrome WebDriver
# The no-argument constructor means it will look for the WebDriver executable in the system's PATH
service = Service()

# WebDriver.ChromeOptions() is used to set the preferences for the Chrome browser
options = webdriver.ChromeOptions()

# Here, we start an instance of the Chrome WebDriver with the defined options and service
driver = webdriver.Chrome(service=service, options=options)

# Your code for interacting with web pages goes here

# In the end, always close or quit the driver to ensure all system resources are freed up
driver.quit()

This Python code imports the necessary libraries, sets up and starts an instance of the WebDriver, where you can then insert the code to interact with web pages. In the end, the WebDriver is properly closed to ensure all system resources are freed up.

TylerH
  • 20,799
  • 66
  • 75
  • 101
0

from selenium import webdriver from webdriver.manager.chrome import ChromeDriverManager

Ex: driver = webdriver.Chrome(ChromeDriverManager("version="114.0.5735.90").install()) driver.get("www.google.com") So.Use like this

Thanks for the solution it's very useful for us.

  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jul 24 '23 at 12:53
0

I found a solution, which is to go back to the previous version 14 and delete the new version 15 while stopping chrome browser updates on this site : https://www.webnots.com/7-ways-to-disable-automatic-chrome-update-in-windows-and-mac/

  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jul 26 '23 at 23:24
0

you need to also use "import browsers" by pip install pybrowser when using this new method of chrome driver manager.

john doe
  • 37
  • 3
0

For me neither of this worked (and couldn't update the Selenium to 4.10 on that machine).

The only thing that worked is updating the webdriver-manager to 4.0.0

With this package update the old syntax

driver = webdriver.Chrome(ChromeDriverManager().install(), options=chrome_options)

started to work again :)

Catalin
  • 282
  • 1
  • 14
-1

I put the version of selene 2.0.0 rc3.post 2 selenium last and on 115 python and tests earned