The path to the driver executable must be set by the webdriver.gecko.driver system property
报这个错,是因为你使用了selenium3+Firefox。在selenium3中,使用Firefox,需要添加驱动。
您可以从Github上下载驱动程序下载网址- https://github.com/mozilla/geckodriver/releases/tag/v0.9.0

在代码中加入
System.setProperty("webdriver.firefox.marionette","C:\\Program Files (x86)\\Mozilla Firefox\\geckodriver.exe");
WebDriver driver=new FirefoxDriver();
C:\\Program Files (x86)\\Mozilla Firefox\\geckodriver.exe是驱动放置的位置
现在,您可以运行程序,你会得到期望的输出。
The path to the driver executable must be set by the webdriver.gecko.driver system property的更多相关文章
- NetBeans IDE驱动报错The path to the driver executable must be set by the web driver.chrome.driver.system property......
问题:defaulstUserDataPath=C:\\Users\\user1\\AppData\\Local\\Google\\Chrome\\User Data\\Defaul 编译失败 解决 ...
- 找不到’geckodriver’ 的环境path问题“ Message: 'geckodriver' executable needs to be in PATH. ”
运行测试脚本报找不到’geckodriver’ 的环境path 的错误 selenium3.x webdriver/firefox/webdriver.py的init中,executable_pat ...
- 【selenium 3】 Mac 下测试环境搭建 Firefox 47+ gecko driver Mac
错误代码如下:File "/usr/local/lib/python2.7/dist-packages/selenium-3.0.0b2-py2.7.egg/selenium/webdriv ...
- selenium 3.0 beta2 初体验
经过漫长的等待,终于迎来了selenium 3.0 从selenium 1.0 至今,差不多有十多年的历史.这个月终于迎来了selenium3.0 那么selenium3.0 为我们带来了什么? 看一 ...
- Selenium 3 -how to locate the chromedriver and geckodriver place?
Maybe you met these exceptions sometimes: 1. Chrome Driver The path to the driver executable must be ...
- 关于Selenium WebDriver的geckodriver
下载Selenium的最新版本地址:http://selenium-release.storage.googleapis.com/index.html 友情提示:如果一直下载不了,可能是浏览器与下载工 ...
- Selenium问题总结
1.Exception in thread "main" org.openqa.selenium.WebDriverException: Cannot find firefox b ...
- 跟浩哥学自动化测试Selenium -- 我的第一个Demo (2)
我的第一个Demo 开始写第一个 Demo 之前,先熟悉一下编写 Selenium 脚本的四个步骤: 驱动路径写法分析:System.setProperty 主要做用是设置系统属性,第一个参数为系统属 ...
- Remote使用出现的问题及解决办法
最近尝试跟着虫师的OP模式所写的bbs代码,应用自己的项目尝试修改,在第一步Remote启动Firefox上便出错,当前selenium2.53,firefox47.1,selenium server ...
随机推荐
- ldap实现用户认证
LDAP的用户认证类. public class LDAPHelper { private DirectoryEntry _objDirectoryEntry; /// <summary> ...
- linux sed 添加 删除 一行
find . -type f -name "*.lua" | xargs sed -i '1 i \#!\/usr\/bin\/lua' #一行前添加(文件至少有一行) 复制自: ...
- Create a Listlink
#ifndef List_h__ #define List_h__ #include <stdio.h> struct ListNode { int value; ListNode* pN ...
- Composer实现PHP中类的自动加载
本篇博客承接上一篇,学习一下Composer实现的PHP的类的自动加载方式.首先说明一下,Composer是PHP针对PHP语言的第三方的依赖管理工具,将工程所用到的依赖文件包含在composer.j ...
- springboot一个service内组件的加载顺序
先加载自身构造器,所以在构造器中初始化时若使用需要注入的(即@Autowired注解的)组件相关的方法,则会报null: 然后加载注入的组件即@Autowired 最后加载@PostConstruct ...
- c#-基础:类的进阶
类的概述: 类是一个能存储数据并执行代码的数据结构 数据成员:通常模拟该类所表示显示世界的事物特性 函数成员:执行代码.模拟显示世界事物的功能和操作 数据成员:字段,常量 函数成员执行代码:方法 运算 ...
- thinkPHP-空操作
空操作 当访问的方法不存在时,可以定义一个empty方法来避免空操作 function _empty() { echo "网页不存在,请检查地址信息"; } 这样当访问不存在的方法 ...
- AIX下安装bash
在AIX系统下,默认是没有安装bash环境的,对于经常操作的维护人员来说,非常不方便,所以下面我们来动手安装bash. 1.确认系统是否已安装bash 方法1:之间敲bash命令,若提示没有此命令则没 ...
- 一、prolog简介
一般来说,人工智能语言应具备如下特点: 1.具有符号处理能力(即非数值处理能力): 2.适合于结构化程序设计,编程容易: 3. 具有递归功能和回溯功能: 4. 具有人机交互能力: 5. 适合于推理: ...
- 关于 Integer 的一个坑
其实 JDK 中有很多小坑, 我们稍微不注意, 就掉进去了, 然后调了半天 bug, 也不知道为何. 很闹心! 这里说一下, 在Integer中的一个小坑. 看一个小例子: @Test public ...