如何查找Google浏览器的Webdriver路径
要查找Google浏览器(也称为Chrome浏览器)的WebDriver路径,您可以按照以下步骤进行操作:
1. 确保您已经安装了Google浏览器,并且版本与WebDriver版本兼容。
2. 在Google浏览器中输入以下网址:chrome://version/,并在地址栏中按下回车键。
3. 在打开的页面中,找到"Google Chrome"的版本号。通常这个信息会显示在“Google Chrome x.x.x.x”或“Google Chrome xxx.xx.xxxxx.xx”格式的位置。
4. 打开Webdriver官方网站(https://chromedriver.chromium.org/downloads)。
5. 根据您浏览器的版本号,从可用的版本中选择与您Google浏览器版本兼容的WebDriver版本。
6. 然后,选择您计算机中的操作系统和软件位数(32位或64位)。
7. 安装所选择的WebDriver版本。
8. WebDriver文件会安装到系统的某个目录中。您可以通过以下方式找到它:
- 在安装路径中查找,通常在C:\Program Files (x86)\Google\Chrome\Application或C:\Program Files\Google\Chrome\Application等位置。
- 检查环境变量:将WebDriver的安装路径添加到环境变量中,然后使用命令行运行“chromedriver”命令,它会返回WebDriver的路径。
- 在浏览器启动时,在启动时指定WebDriver的路径,例如:webdriver.Chrome("path_to_chromedriver")。
请注意,由于不同操作系统和浏览器版本的差异,WebDriver的安装路径可能会有所不同。
原文链接: https://www.5axxw.com/questions/simple/8448di
相关链接:
Python实战:用Selenium爬取网页数据 https://zhuanlan.zhihu.com/p/626023138
使用Selenium和ChromeDriver操作浏览器获取动态数据 https://blog.csdn.net/weixin_43740011/article/details/130661651
https://chromedriver.storage.googleapis.com/index.html
https://chromedriver.chromium.org/downloads
https://registry.npmmirror.com/binary.html?path=chromedriver