试了把chromedriver.exe放到chrome安装文件下,python安装文件下,然后把路径配到path里,均无用。

最后是修改函数调用得以解决:

from selenium import  webdriver

browser = webdriver.Chrome(executable_path = 'C:\Program Files (x86)\Google\Chrome\Application\chromedriver_X64.exe')
browser.get('http://www.baidu.com')
executable_path指定了chromedriver所在的路径,程序运行时就会到该路径下启动chrome浏览器

解决 'chromedriver' executable needs to be in PATH.'报错的更多相关文章

  1. 关于 'chromedriver' executable needs to be in PATH 的解决办法

    用 chrome 浏览器跑 selenium,执行以下脚本: from selenium import webdriverdr=webdriver.Chrome()dr.maximize_window ...

  2. 解决:'chromedriver' executable needs to be in PATH的问题

    0.前言 今天写一个B站登录的模拟器时,用到了Chrome浏览器,但是会报了一个异常"'chromedriver' executable needs to be in PATH", ...

  3. Chromedriver executable needs to be in path 解决办法

    执行webdriver.Chrome()时报错:Chromedriver executable needs to be in path. 原因可能是为有安装Chromedriver 可能是Chrome ...

  4. 解决selenium.common.exception.WebDriverException:Message:'chromedriver' executable needs to be in Path

    'chromedriver' executable needs to be in Path 声明:本人萌新,刚学python不久记录一下自己的坑,发出来若能帮助到一些人尽早解决问题那便是极好的,( ̄▽ ...

  5. selenium使用遇到的问题(selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH.)

    1.安装pip3 install selenium 2.使用browser=webdriver.Chrome()时报错 :selenium.common.exceptions.WebDriverExc ...

  6. python+selenium,打开浏览器时报selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH

    有一年多没写web自动化了,今天搭建环境的时候报了一个常见错误,但是处理过程有点闹心,报错就是常见的找不到驱动<selenium.common.exceptions.WebDriverExcep ...

  7. mac-webui-selenium下的webdriver selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH

    from selenium import webdriver def test1(): url='http://www.baidu.com' driver=webdriver.Chrome(" ...

  8. centos7 selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH

    1.查看安装的chrome浏览器版本 2.查看版本对应的驱动 https://sites.google.com/a/chromium.org/chromedriver/downloads 下载后拷贝到 ...

  9. 解决Windows下运行php Composer出现SSL报错的问题

    解决Windows下运行php Composer出现SSL报错的问题 2015-01-14 20:05   在windows下运行composer却出现SSL报错: E:\www>php -f  ...

随机推荐

  1. Allegro PCB中封装焊盘替换操作详解

    Allegro PCB中有些功能在某种情况下使用会产生神奇的效果,但有部分人不会或不熟悉在特定情况下使用某些功能来解决问题.如焊盘替换,有些特殊器件(如下图)封装按照datasheet给出的参考制作, ...

  2. WPF 的 MVVM

    Model——View——ViewModel http://www.cnblogs.com/fdyang/p/3877309.html

  3. 一步一步教你在 Android 里创建自己的账号系统(一)

    大家假设喜欢我的博客,请关注一下我的微博,请点击这里(http://weibo.com/kifile),谢谢 转载请标明出处(http://blog.csdn.net/kifile),再次感谢 大家在 ...

  4. webstorm 设置IP 访问 手机测试效果

    http://www.cnblogs.com/gulei/p/5126383.html 前端开发中,经常需要将做好的页面给其他同事预览或手机测试,之前一直用的第三方本地服务器usbwebserver, ...

  5. 项目中遇到Uncaught TypeError: Converting circular structure to JSON报错问题

    最近公司项目中出现一个报错Uncaught TypeError: Converting circular structure to JSON,,根据上述报错可以知道代码是运行到JSON.stringi ...

  6. 命令行查看memcached的运行状态(转载)

    很多时候需要监控服务器上的Memcached运行情况,比如缓存的查询次数,命中率之类的.但找到的那个memcached-tool是linux下用perl写的,我也没试过windows能不能用.后来发现 ...

  7. python中的and和or(转载)

    python中的and和or 4.6. and 和 or 的特殊性质在Python 中,and 和 or 执行布尔逻辑演算,如你所期待的一样,但是它们并不返回布尔值:而是,返回它们实际进行比较的值之一 ...

  8. 【TensorFlow-windows】(五) CNN(卷积神经网络)对cifar10的识别

    主要内容: 1.基于CNN的cifar10识别(详细代码注释) 2.该实现中的函数总结 平台: 1.windows 10 64位 2.Anaconda3-4.2.0-Windows-x86_64.ex ...

  9. android启动另一应用

    http://www.2cto.com/kf/201203/122910.html Android SDK中有这样一个API: public abstract Intent getLaunchInte ...

  10. android检测当前网络是否可用

    在android程序中运行第一步就是检测当前有无可用网络  如果没有网络可用就退出程序  if (isConnect(this)==false)           {                ...