解决:WebDriverException: 'chromedriver' executable needs to be in PATH
tags: 错误故障, WebDriver, Selenium, Python
在 Python 下引用 Selenium 包开发时,刚开始测试 WebDriver 的功能直接就甩出了一个错误消息然后就中断了,错误消息:WebDriverException: 'chromedriver' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home
搜索并尝试一番后,顺利解决。方法如下:
- 安装 selenium 的 python 包之后,还要安装浏览器 driver
我用的是 Chrome,以此为例:
a. 下载 ChromeDriver。其它浏览器参见官网说明
b. 复制 chromedrive
文件到 Google Chrome 程序目录下。各操作系统里的位置路径可以参考官方Wiki
- Python 代码里创建 webdriver 对象时传递
chromedrive
路径
##示例代码 (MacOS + chrome 环境) chromedriver = "/Applications/Google Chrome.app/Contents/MacOS/chromedriver" browser = webdriver.Chrome(chromedriver)
相关:Python + Selenium 开发的准备工作
[正文结束]
[更新记录]
2016-12-16, 初建笔记
转载于:https://www.cnblogs.com/buchiany/p/6379305.html
解决:WebDriverException: 'chromedriver' executable needs to be in PATH相关推荐
- 搭建webUI自动化及问题解决:Message: ‘chromedriver‘ executable needs to be in PATH.解决办法
搭建webUI自动化环境 1.conda install selenium即可. 若出现:Message: 'chromedriver' executable needs to be in PATH. ...
- 解决browser = webdriver.Chrome()报错 :Message: 'chromedriver' executable needs to be in PATH.
问题说明: 使用selenium模块的webdriver打开谷歌浏览器的时候报错: Message: 'chromedriver' executable needs to be in PATH. 问题 ...
- RIDE用到chrome浏览器:Message: ‘chromedriver‘ executable needs to be in PATH.
使用RIDE写测试的时候报错. Message: 'chromedriver' executable needs to be in PATH. 原因:没有chrome驱动. 解决办法: 1 确定自己的 ...
- 解决exec: “stringer“: executable file not found in %PATH%
想使用golang.org/x/tools/cmd/stringer这个包,但报了exec: "stringer": executable file not found in %P ...
- 'chromedriver' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/ch
第一个解决方法: 你去下载一个chromedriver然后放在指定文件夹并且加入PATH环境变量.结果是,我把chromedriver放进了chrome的文件夹,并且把那个文件夹加入了环境变量,然后不 ...
- selenium.common.exceptions.WebDriverException: Message: ‘chromedriver‘ executable needs to bein PATH
使用Selenium模拟浏览器访问淘宝首页,出现报警 from selenium import webdriver import timebrowser = webdriver.Chrome() br ...
- 解决使用selenium库出现的“Message: 'chromedriver' executable may have wrong permissions”问题
解决使用selenium库出现的"Message: 'chromedriver' executable may have wrong permissions"问题 2018年04月 ...
- 成功解决RuntimeError: Java is not installed, or the Java executable is not on system path
成功解决RuntimeError("Java is not installed, or the Java executable is not on system path") Ru ...
- Windows系统kratos生成proto代码是报exec: “protoc“: executable file not found in %PATH%错误解决办法
前言 今天用kratos的cli工具生成生成 Proto 代码时直接报错了,直接报: exec: "protoc": executable file not found in %P ...
最新文章
- 技术方案——可控组播
- 基于mcat开发以太坊智能合约
- Android GraphicBuffer
- python3 asyncio 爬虫_python3 asyncio异步新浪微博爬虫WeiboSpider
- Python爬虫之环境安装
- 当前只读状态:是_DM数据库的启停以及数据库状态检查
- 本机连接虚拟机mysql,使用本机Navicat连接CentOS虚拟机的MySQL
- maven jersey mysql_Maven和Jersey Framework开发REST风格Web Service
- html站点地图怎么做,网站地图(站点地图)详细介绍、以及如何制作详解
- Windows文件同步
- tp5 微信新版本商家转到到零钱,v3秘钥,平台证书和平台证书序列号
- lgv30刷android10,记一次LG V30系列手机完美刷入MIUI12系统和Flyme刷机教程
- 55句史上最伤人的语录集:看完一阵心酸啊
- qt - the inferior stopped because it received a signal from the operation system.
- CSS之背景样式及边框样式
- 应用程序框架 Application Framework
- 2.5G 电口网络应用,拭目以待
- unicode 生僻字_生僻字打不出来怎么办?教你一招轻松应对!
- 开启xmp1还是2_玩机鸭x:手机开启“强制进行GPU渲染”功能对手机有什么影响?...
- 拉丁方阵C语言csdn,C语言:拉丁方阵