Is there a method of automating the process of downloading the latest Chrome Driver for a Selenium project?

0

Issue

I am currently in the process of teaching myself Python and I have chosen to make my first project a Selenium project that can automate my online shopping.

I have the project running fairly smoothly but I can see some potential pitfalls in the near future.

Once Chrome updates to a newer version, will my project fail to work due to having an older Chrome driver installed?

If this is the case, which I assume it is, is there a method to check the correct Chrome Driver is installed and if not, install the correct driver?

Solution

please find below answer :

use below command to install webdriver manager

pip install webdriver_manager

**Use with Chrome:**

from webdriver_manager.chrome import ChromeDriverManager

webdriver.Chrome(ChromeDriverManager().install())

for more details please find below link::
https://github.com/SergeyPirogov/webdriver_manager

Answered By – SeleniumUser

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave A Reply

Your email address will not be published.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More