kwsong0314
kwsong0314

Reputation: 251

Is the Chrome Driver Management module downloading the latest version or is it downloading the correct version of my Chrome version?

I know this code allows you to download and use the most recent version of the chrome driver.

    driver = webdriver.Chrome(ChromeDriverManager().install(), chrome_options=options)

If my version of chrome is an older version, does that code matter? Or does that code download a chrome driver for my version of Chrome?

Upvotes: 1

Views: 119

Answers (1)

cruisepandey
cruisepandey

Reputation: 29372

here what official doc says :

Python module to facilitate downloading and deploying WebDriver binaries. The classes in this module can be used to automatically search for and download the latest version (or a specific version) of a WebDriver binary and then extract it and place it by copying or symlinking it to the location where Selenium or other tools should be able to find it then.

Reference link

Read more about chromedriver-autoinstaller

Installation

pip install chromedriver-autoinstaller

Usage

Just type import chromedriver_autoinstaller in the module you want to use chromedriver.

Example

from selenium import webdriver
import chromedriver_autoinstaller


chromedriver_autoinstaller.install()  # Check if the current version of chromedriver exists
                                      # and if it doesn't exist, download it automatically,
                                      # then add chromedriver to path

driver = webdriver.Chrome()
driver.get("http://www.python.org")
assert "Python" in driver.title

Reference Link here

Upvotes: 1

Related Questions