Writing a simple selenium script to click on links on aa website. The script is written like so:
from selenium import webdriver
import time
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument("--headless")
chrome_options.add_argument("--disable-gpu")
browser = webdriver.Chrome(options=chrome_options)
try:
browser.get("https://www.google.com")
print("Page title was '{}'".format(browser.title))
finally:
browser.quit()
Now the issue is the actual chrome driver itself I get the following exception
selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 94
Current browser version is 93.0.4577.82 with binary path /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
I went to the chromedriver downloads site. I still get the same error though.
Compatibility issue.
Your chrome driver
version is 94.0.4606.41
and this driver
version supports Chrome browser 94
Please do anyone of the following.
chrome browser
version to 94
driver
version to 93
(Download 93
version from here https://chromedriver.storage.googleapis.com/index.html?path=93.0.4577.63/)This error occurred because you have different versions of Google Chrome and driver. It is better to update the driver, rather than install the old version of Google, since in the future it will be constantly updated (why do you want to use outdated technologies?). I usually use :
ChromeDriverManager
because at any time without going to the web driver website you can simply download the driver with the following command:
driver = webdriver.Chrome(ChromeDriverManager().install())
Further, using the path given by this command, you can use the freshly installed version:
driver = webdriver.Chrome(executable_path=r"C:\path_to_chrome_driver_executable\chromedriver.exe")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With