使用selenium调用webdriver的时候报错。

from selenium import webdriver

browser = webdriver.Chrome()
browser.get("http://www.baidu.com")
print(browser.page_source)
browser.close()

output:

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

提示chromedriver需要加入环境变量。

查找chromedriver.exe未果,遂下载。

下载地址:http://npm.taobao.org/mirrors/chromedriver/

贴心提示:  chromedriver需要与chrome版本对应

chrome版本查看方式 :帮助——关于 Google Chrome(G) 

使用方式:

  • 将chrome.exe直接放入chrome目录下。
  • 将chrome.exe所在路径加入环境变量。

selenium调用webdriver异常的更多相关文章

  1. Selenium调用webdriver.chrome()出错

    问题描述: 今天因为在学习要使用selenium这个python库,我下载好了selenium,并且也Import成功了,但是在我使用webdirver.chorme()时,却提示PATH路径中没有c ...

  2. Selenium VS Webdriver

    Selenium 是 ThroughtWorks 一个强大的基于浏览器的开源自动化测试工具,它通常用来编写 Web 应用的自动化测试.随着 Selenium 团队发布 Selenium 2(又名 We ...

  3. Selenium调用Chrome,Firefox,IE

    C#环境下,使用Selenium调用不同的浏览器,可以使用如下方法: IWebDriver driver = null; string Browser =null; if (Browser.Equal ...

  4. 【转】selenium及webdriver的原理

    主要内容转自:http://blog.csdn.net/ant_ren/article/details/7968582和http://blog.csdn.net/ant_ren/article/det ...

  5. selenium及webdriver的原理

    主要内容转自:http://blog.csdn.net/ant_ren/article/details/7968582和http://blog.csdn.net/ant_ren/article/det ...

  6. selenium和webdriver区别

    接触selenium大概半年时间了.从开始的预研,简单的写个流程到后期的自动化框架的开发,因为本人不属于代码方面的大牛,一直的边研究边做.逐步深入学习.近期发现自己对本身selenium的发展还存在困 ...

  7. Selenium的webdriver的常用方法,鼠标事件

    就来认识 WebDriver 中最常用的几个方法: get():跳转到的地址clear(): 清除文本. send_keys (value): 模拟按键输入. click(): 单击元素. 示例: f ...

  8. Selenium:WebDriver简介及元素定位

    参考内容:官方API文档,下载链接:http://download.csdn.net/detail/kwgkwg001/4004500 虫师:<selenium2自动化测试实战-基于python ...

  9. selenium及webdriver的原理【转】

    selenium与webdriver整合后,形成的新的测试工具叫做selenium2.x.在selenium1时间,selenium使用javascript来达到测试自动化的目标. 1. seleni ...

随机推荐

  1. Spring中的接口BeanFactory和FactoryBean的学习

    BeanFactory: 相当于对象工厂,可以获取对象的实例以及相应的属性.BeanFactory定义了IOC容器的最基本形式,并提供了IOC容器应遵守的的最基本的接口,也就是Spring IOC所遵 ...

  2. 【rabbitmq】RabbitMQ 集群与网络分区

    网络分区(network partitions) 官网-网络分区 网络设备故障导致的网络分裂.比如,存在A\B\C\D\E五个节点,A\B处于同一子网,B\C\D处于另外一子网,中间通过交换机相连.若 ...

  3. Sql case when 示例

    SELECT       单元编号,年,月,   项目编号='11111',   sum(case  when 项目编号= 'ZB010201' then [当月额] else 0 end ) 医疗收 ...

  4. html字体加大标签与写法介绍

    在html中字体加大的标签为<big>,一般用于重要文字,醒目文字,让用户容易看到! 字体加大: <big>写上你想写的字</big> 效果:未加大  加大 效果中 ...

  5. vue 路由别名 路由跳转

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  6. hive函数--编码解码

    以UTF-8为例: 测试字符串:☕️午后咖啡☕️ 一.编码 hive"); 输出: %E2%98%95%EF%B8%8F%E5%8D%88%E5%90%8E%E5%92%96%E5%95%A ...

  7. SVN忽略已提交的文件(ignore,移出版本控制)

    本文适用于已安装TortoiseSVN客户端的同学. 1.右键点击要忽略的文件夹或文件,鼠标移到“TortoiseSVN”,找到“Unversion and add to ignore list”,选 ...

  8. LeetCode1-5题

    1.两数之和 给定一个整数数组 nums 和一个目标值 target,请你在该数组中找出和为目标值的那 两个 整数,并返回他们的数组下标. 你可以假设每种输入只会对应一个答案.但是,你不能重复利用这个 ...

  9. Jmeter5.1.1+python调用python脚本

    1.下载jython https://www.jython.org/downloads.html 下载Download Jython 2.7.0 - Standalone Jar : For embe ...

  10. 分布式 基本理论 BASE

    比起CAP的生硬来, 我更加喜欢BASE.BASE 显得更加好理解.尽管BASE 这个名字本身有迎合语言习惯的恶臭味,为什么不是缩写为 BaSsEc 呢? 其实大部分系统是可以 同时 CAP 的, 因 ...