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

搜索并尝试一番后,顺利解决。方法如下:

  1. 安装 selenium 的 python 包之后,还要安装浏览器 driver
    我用的是 Chrome,以此为例:

a. 下载 ChromeDriver。其它浏览器参见官网说明

b. 复制 chromedrive 文件到 Google Chrome 程序目录下。各操作系统里的位置路径可以参考官方Wiki

  1. 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相关推荐

  1. 搭建webUI自动化及问题解决:Message: ‘chromedriver‘ executable needs to be in PATH.解决办法

    搭建webUI自动化环境 1.conda install selenium即可. 若出现:Message: 'chromedriver' executable needs to be in PATH. ...

  2. 解决browser = webdriver.Chrome()报错 :Message: 'chromedriver' executable needs to be in PATH.

    问题说明: 使用selenium模块的webdriver打开谷歌浏览器的时候报错: Message: 'chromedriver' executable needs to be in PATH. 问题 ...

  3. RIDE用到chrome浏览器:Message: ‘chromedriver‘ executable needs to be in PATH.

    使用RIDE写测试的时候报错. Message: 'chromedriver' executable needs to be in PATH. 原因:没有chrome驱动. 解决办法: 1 确定自己的 ...

  4. 解决exec: “stringer“: executable file not found in %PATH%

    想使用golang.org/x/tools/cmd/stringer这个包,但报了exec: "stringer": executable file not found in %P ...

  5. 'chromedriver' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/ch

    第一个解决方法: 你去下载一个chromedriver然后放在指定文件夹并且加入PATH环境变量.结果是,我把chromedriver放进了chrome的文件夹,并且把那个文件夹加入了环境变量,然后不 ...

  6. selenium.common.exceptions.WebDriverException: Message: ‘chromedriver‘ executable needs to bein PATH

    使用Selenium模拟浏览器访问淘宝首页,出现报警 from selenium import webdriver import timebrowser = webdriver.Chrome() br ...

  7. 解决使用selenium库出现的“Message: 'chromedriver' executable may have wrong permissions”问题

    解决使用selenium库出现的"Message: 'chromedriver' executable may have wrong permissions"问题 2018年04月 ...

  8. 成功解决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 ...

  9. Windows系统kratos生成proto代码是报exec: “protoc“: executable file not found in %PATH%错误解决办法

    前言 今天用kratos的cli工具生成生成 Proto 代码时直接报错了,直接报: exec: "protoc": executable file not found in %P ...

最新文章

  1. 技术方案——可控组播
  2. 基于mcat开发以太坊智能合约
  3. Android GraphicBuffer
  4. python3 asyncio 爬虫_python3 asyncio异步新浪微博爬虫WeiboSpider
  5. Python爬虫之环境安装
  6. 当前只读状态:是_DM数据库的启停以及数据库状态检查
  7. 本机连接虚拟机mysql,使用本机Navicat连接CentOS虚拟机的MySQL
  8. maven jersey mysql_Maven和Jersey Framework开发REST风格Web Service
  9. html站点地图怎么做,网站地图(站点地图)详细介绍、以及如何制作详解
  10. Windows文件同步
  11. tp5 微信新版本商家转到到零钱,v3秘钥,平台证书和平台证书序列号
  12. lgv30刷android10,记一次LG V30系列手机完美刷入MIUI12系统和Flyme刷机教程
  13. 55句史上最伤人的语录集:看完一阵心酸啊
  14. qt - the inferior stopped because it received a signal from the operation system.
  15. CSS之背景样式及边框样式
  16. 应用程序框架 Application Framework
  17. 2.5G 电口网络应用,拭目以待
  18. unicode 生僻字_生僻字打不出来怎么办?教你一招轻松应对!
  19. 开启xmp1还是2_玩机鸭x:手机开启“强制进行GPU渲染”功能对手机有什么影响?...
  20. 拉丁方阵C语言csdn,C语言:拉丁方阵

热门文章

  1. 浅析crontab命令
  2. Linux操作系统的权限代码分析【转】
  3. PHP学习笔记01——基础语法
  4. 系统目录 linux命令,linux基础命令之系统目录(示例代码)
  5. 使用NoSQL Manager for MongoDB客户端连接mongodb
  6. Eclipse安装git插件以及关联导入GitHub项目
  7. 蒸妙集团用科学熏蒸法,弥补现代人在运动上的缺乏
  8. fiddler启用过滤规则只显示想要的接口数据
  9. python 二维矩阵及转byte知识点
  10. Android进阶: 10分钟实现NDK-JNI 开发教程