zoukankan      html  css  js  c++  java
  • selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH

    无法运行时候:

    selenium使用Chrome时报错:

    selenium.common.exceptions.WebDriverException: Message: ‘chromedriver’ executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home

    1、进入页面

    https://sites.google.com/a/chromium.org/chromedriver/home


    2、选择合适的Chrome版本下载

    3、解压下的Chromedriver放到python安装的目录下,

    4、运行测试

    from selenium import webdriver                     # 从selenium导入webdriver

    driver = webdriver.Chrome()                          # Optional argument, if not specified will search path.
    driver.get('https://www.baidu.com')                # 获取百度页面

    可以了,之前测试了好几次,安装其他目录加到环境变量还是不行,后来放到python安装目录下就好了。
    ————————————————
    版权声明:本文为CSDN博主「奋斗吧-皮卡丘」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
    原文链接:https://blog.csdn.net/weixin_42081389/article/details/88046681

  • 相关阅读:
    (四)rsync未授权访问
    (前言一)HTTP报文
    (一)会话固定攻击
    使用Burp、PhantomJS进行XSS检测
    win10配置环境变量
    java学习网站http://how2j.cn/
    镜像下载
    jQuery
    jQuery
    jQuery
  • 原文地址:https://www.cnblogs.com/wenjing2019/p/11957346.html
Copyright © 2011-2022 走看看