zoukankan      html  css  js  c++  java
  • windows下使用selenium报错selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to be in PATH

    问题 :执行程序代码报错:

    WebDriverException:Message:'geckodriver'executable needs to be in Path

    或者

    selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to be in PATH.

     原因:因为firefox4.8以上的版本都需要第三方geckodriver来驱动firefox,如果是firefox4.8以下的版本内置驱动就可以了,不用另外下载

    解决,geckodriver是一原生态的第三方浏览器,对于selenium3.x版本都会使用geckodriver来驱动firefox,所以需要下载geckodriver.exe。放置在Path 环境变量可以访问到的地方。例如 C:python27目录下

    Geckodirver的下载地址:https://github.com/mozilla/geckodriver/releases下载解压后,直接扔到C:python27目录下

  • 相关阅读:
    【C++】基础及引用
    gradle打包分编译环境
    gradle
    MediaPlayer滑动不准的问题
    python初步入门
    音频播放服务
    《深入理解Android2》读书笔记(二)
    缓存(LruCache)机制
    handler机制
    监听网络状态
  • 原文地址:https://www.cnblogs.com/JahanGu/p/8337886.html
Copyright © 2011-2022 走看看