zoukankan      html  css  js  c++  java
  • selenium测试

    环境:Python2.7+selenium3+Firefox47
     
    问题1:
    在打开火狐浏览器时报错:‘geckodriver‘ executable needs to be in PATH
    from selenium import webdriver
     
    解决:
    1.查看C:Python27Libsite-packagesseleniumwebdriverfirefox中的webdriver.py,在def_init_函数中,executable_path="geckodriver",之前搭建的环境上是executable_path="wires";
    2.geckodriver是一原生态的第三方浏览器,对于selenium3.x版本都会使用geckodriver来驱动firefox,所以需要下载geckodriver.exe,下载地址:https://github.com/mozilla/geckodriver/releases
    3.放在C:Python27(查看环境变量path中是否添加C:Python27该路径)
     
    问题2:
    结果又出现报错:selenium.common.exceptions.WebDriverException: Message: Unable to find a matching set of capabilities
     
    解决:
    更新火狐浏览器到Firefox57
  • 相关阅读:
    git
    *** errRun
    Centos与Debian的安装命令
    HTML基础
    基本的SQL语言
    phpstudy靶场搭建
    Centos7下搭建服务器(apache+mysql+php)
    Centos7设置yum源
    Linux基础
    一个服务器中搭建多个站点
  • 原文地址:https://www.cnblogs.com/studyddup0212/p/9059504.html
Copyright © 2011-2022 走看看