Recently I ran into an issue, my chrome version is 122.0.6261.95 but when I tried to find chrome driver for 122.0.6261.95 it was not available. Closest one available was 122.0.6261.94. So I downloaded 122.0.6261.94, chromedriver zip file, extracted it, and put both the files chromedriver.exe and Lisence.chromedriver in the Python root directory.
Issue: Mismatched ChromeDriver.exe Version
As soon as I hit entered I ran into this issue:
Upon close inspection I came to know this is because of mismatched chromedriver.exe version it is throwing error.
Solution: Automatically fetch chromedriver.exe and add it to the program
There is something called webdriver-manager
it manages your all of your webdriver.
How to install webdriver-manager?
You can easily use the pip command. Run the below command to install the webdrver-manager.
Now, fetch the chromedriver.exe using webdriver-manager and pass it to the program. Refer to the below code snippet ????.