selenium - 下载了 chromeDriver 但我的 Visual Studio 代码仍然要求我下载 chromeDriver
问题描述
Traceback(最近一次调用最后):文件“c:/Users/et_on/Documents/Eoyzyc's Code/AMZN_Search_TC_001.py”,第 4 行,在 driver = webdriver.Chrome('/path/to/chromedriver') # 可选参数,如果未指定将搜索路径。文件“C:\Users\et_on\AppData\Local\Programs\Python\Python38-32\lib\site-packages\selenium\webdriver\chrome\webdriver.py”,第 73 行,在init self.service.start()文件“C:\Users\et_on\AppData\Local\Programs\Python\Python38-32\lib\site-packages\selenium\webdriver\common\service.py”,第 81 行,开始引发 WebDriverException(selenium.common. exceptions.WebDriverException:消息:“chromedriver”可执行文件需要在 PATH 中。请参阅https://sites.google.com/a/chromium.org/chromedriver/home
解决方案
将路径添加到 chromedriver.exe 找到的位置。
如果文档上有 chromedriver.exe:您可以添加到路径,例如:C:\Users\User\Documents
推荐阅读
- xml - 通过 XSD 重新定义附加限制模式
- flutter - 未找到颤振命令
- c++ - 在 c++2a 标准中制作基于 linux 的调度功能
- python - 我建立了一个聊天机器人。它如何识别“hi”和“hire”之间的区别
- c++ - 车辆和箱子碰撞之间的重叠不起作用ue4
- python - 创建使用 `--history` 创建的 Conda 环境时的`ResolvePackageNotFound`
- java - Android Studio 的问题(Java 版本的问题)
- java - 如何禁用所有 SLF4J 消息
- python - 从被摧毁的外星人身上掉落电源 - 外星人入侵
- python - 使用循环为多列创建子图