学习selenium过程中,求chromedriver的下载资源和安装方法

z286898537 2017-08-27 05:35:10

如题哈~
网上找了很多,依葫芦画瓢但一直报错:
Traceback (most recent call last):
File "C:\p352\lib\site-packages\selenium\webdriver\common\service.py", line 64, in start
stdout=self.log_file, stderr=self.log_file)
File "C:\p352\lib\subprocess.py", line 947, in __init__
restore_signals, start_new_session)
File "C:\p352\lib\subprocess.py", line 1224, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] 系统找不到指定的文件。

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "<pyshell#9>", line 1, in <module>
brw = wdr.Chrome()
File "C:\p352\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 62, in __init__
self.service.start()
File "C:\p352\lib\site-packages\selenium\webdriver\common\service.py", line 71, in start
os.path.basename(self.path), self.start_error_message)
selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home
...全文
1015 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
xiaofeng1qaz 2017-11-19
  • 打赏
  • 举报
回复
http://blog.csdn.net/u012359618/article/details/52556127;你可以参照这篇帖子进行哈,我最近也在学习时遇到这个问题,不过需要注意一点,设置好变量后需要先退出Python编译环境,再次进入以进行测试,否则会运行代码会提示错误哈(此处感谢那篇帖子主人,首次作答哈)

6,721

社区成员

发帖
与我相关
我的任务
社区描述
专题开发/技术/项目 Google技术社区
社区管理员
  • Google技术社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧