Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Which version of Chrome Driver should I download for selenium?

Now, I am using Chrome browser Version 119.0.6045.160. But the latest Chrome Driver version, I downloaded is "ChromeDriver 114.0.5735.90"

For this code in python,

from selenium import webdriver

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

import os

os.environ[‘PATH’] += r"D:/chromedriver_win32"

driver = webdriver.Chrome()

I got this error

How, to fix this error?

>Solution :

First you need to install webdriver-manager

pip install webdriver-manager

For selenium 4 here is the demo:

from selenium import webdriver
from selenium.webdriver.chrome.service import Service as ChromeService
from webdriver_manager.chrome import ChromeDriverManager

driver = webdriver.Chrome(service=ChromeService(
    ChromeDriverManager().install()))

driver.get("http://www.python.org")

driver.close()

If you are using selenium 3 then:

from selenium import webdriver
from webdriver_manager.chrome import ChromeDriverManager

driver = webdriver.Chrome(ChromeDriverManager().install())

driver.get("http://www.python.org")

driver.close()
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading