Python Chrome驱动程序管理模块下载的是最新版本还是我的Chrome版本的正确版本?

Python Chrome驱动程序管理模块下载的是最新版本还是我的Chrome版本的正确版本?,python,selenium,selenium-chromedriver,Python,Selenium,Selenium Chromedriver,我知道这段代码允许您下载并使用最新版本的chrome驱动程序 driver = webdriver.Chrome(ChromeDriverManager().install(), chrome_options=options) 如果我的chrome版本是旧版本,那么代码是否重要?或者该代码是否为我的chrome版本下载了chrome驱动程序?这里是官方文件所说的: Python模块,方便下载和部署WebDriver 二进制文件。此模块中的类可用于自动 搜索并下载的最新版本(或特定版本)

我知道这段代码允许您下载并使用最新版本的chrome驱动程序

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

如果我的chrome版本是旧版本,那么代码是否重要?或者该代码是否为我的chrome版本下载了chrome驱动程序?

这里是官方文件所说的:

Python模块,方便下载和部署WebDriver 二进制文件。此模块中的类可用于自动 搜索并下载的最新版本(或特定版本) 一个WebDriver二进制文件,然后通过复制或 将其符号链接到应安装Selenium或其他工具的位置 我那时能找到它

阅读有关chromedriver自动安装程序的更多信息

安装

pip install chromedriver-autoinstaller
用法

Just type import chromedriver_autoinstaller in the module you want to use chromedriver.
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
示例

Just type import chromedriver_autoinstaller in the module you want to use chromedriver.
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