我知道webdriver.Chrome()
下面可以获取 chrome 驱动程序,但我不知道它获取的是哪个版本的 chrome 驱动程序,因为the doc https://selenium-python.readthedocs.io/没有任何这样的解释。 *我用硒4.11.2:
from selenium import webdriver
driver = webdriver.Chrome()
那么,哪个版本的 chrome 驱动程序可以webdriver.Chrome()
得到?最新的吗?
假设你有硒4.11.2
或更新安装,调用webdriver.Chrome()
将检查您的 PATH 上是否有任何现有的 chromedriver 与您的 Chrome 版本匹配。如果没有,它会自动下载正确的驱动程序版本供您使用~/.cache/selenium
.
这里有一篇关于它的博客文章:https://www.selenium.dev/blog/2023/whats-new-in-selenium-manager-with-selenium-4.11.0/ https://www.selenium.dev/blog/2023/whats-new-in-selenium-manager-with-selenium-4.11.0/
Chromium 团队最近重组了新的 Chrome-for-Testing 的驱动程序下载(请参阅https://googlechromelabs.github.io/chrome-for-testing/ https://googlechromelabs.github.io/chrome-for-testing/)。最新版本的 Selenium 是为了处理最新的驱动程序而构建的。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)