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

  • 相关阅读:
    java的锁机制
    视图生命周期
    UIButton @selector 想要传递多个参数
    UIButton @selector 想要传递多个参数
    UITableView 实现A1A2---Z1Z2.。。。。
    iOS 代理
    PickerView
    照片墙
    分栏控制器
    XIB 拖控件
  • 原文地址:https://www.cnblogs.com/wenjing2019/p/11957346.html
Copyright © 2011-2022 走看看