I'm struggling with Selenium because the official Getting Started code in the Driver Management Software section returns me an error:
OFFICIAL CODE
# Use Webdriver Manager for Python: https://github.com/SergeyPirogov/webdriver_manager
# Import code:
from selenium import webdriver
from webdriver_manager.chrome import ChromeDriverManager
from selenium.webdriver.chrome.service import Service
# Use the `install()` method to set `executabe_path` in a new `Service` instance:
service = Service(executable_path=ChromeDriverManager().install())
# Pass in the `Service` instance with the `service` keyword:
driver = webdriver.Chrome(service=service)
ERROR
Current google-chrome version is 96.0.4664
Get LATEST chromedriver version for 96.0.4664 google-chrome
Driver [C:\Users\my_name\.wdm\drivers\chromedriver\win32\96.0.4664.45\chromedriver.exe] found in cache
The problem is that I've already downloaded the latest chromedriver version available, as you can see in the image below:
The chromedriver version downloaded
My Chrome Version is 96.0.4664.110 and I didn't find that version in the download drivers list, so I just downloaded the latest 96.0.4664 version (which was the 96.0.4664.45 version), as the error suggested.
CodePudding user response:
These log messages...
Current google-chrome version is 96.0.4664
Get LATEST chromedriver version for 96.0.4664 google-chrome
Driver [C:\Users\my_name\.wdm\drivers\chromedriver\win32\96.0.4664.45\chromedriver.exe] found in cache
...aren't any errors as such but operational log messages.
Irespective of having downloaded the latest ChromeDriver version available or even not having it, webdriver-manager will download the matching ChromeDriver as per the google-chrome version installed within your system.
Though the Chrome Browser team recently pushed a minor update and the current version being Version 96.0.4664.110, but the latest ChromeDriver v96.0.4664.45 have been tested and seems to work perfecto with Chrome Browser Version 96.0.4664.110. So you are safe and all set.