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 ...
随机推荐
- java socket 通讯
(转)http://blog.csdn.net/xn4545945/article/details/8098646
- Linux 网络基本配置
一.Linux网络配置文件 1. /etc/sysconfig/network-scripts/ifcfg-eth0 文件 在Red Hat系统中,系统网络设备的配置文件保存在/etc/syscon ...
- shell 判断文件是否存在
举例 #!/bin/sh myFile="/var /log/httpd/access.log" if [ ! -e "$myFile" ]; then tou ...
- bugfree安装 centos
bugfree团队早已不做支持,转作禅道管理了,关于其中恩怨可以参见http://www.bugfree.cn/ 组里同事要用此做管理,所以写此文档,以备后用 ==================== ...
- SQL Server Reporting Services (SSRS): Reporting Services in SQL Server 2012 (codename "Denali") will support XLSX, DOCX formats. Bye bye 65536 rows limit in XLS files ;)
当SSRS报表的时候,若相应EXCEL是2003以下,在行数超过65536的时候报表会报错 "Microsoft.ReportingServices.ReportProcessing.Han ...
- javascript判断iphone/android手机横竖屏模式的函数
function orientationChange(){ switch(window.orientation) { case 0: // Portrait case 180: // Upside-d ...
- 老生长谈,温故知新:css实现右侧固定宽度,左侧宽度自适应
反过来也可以:左侧宽度固定,右侧自适应.不管是左是右,反正就是一边宽度固定,一边宽度自适应. 这种布局比较常见,博客园很多默认主题就是这种.一般情况下,这种布局中宽度固定的区域是侧边栏,而自适应的区域 ...
- location.hash详解
一.#的涵义 #代表网页中的一个位置.其右面的字符,就是该位置的标识符.比如, http://www.example.com/index.html#print 就代表网页index.html的prin ...
- ue4框架C++语法汇总文章
1.Run external .exe file TCHAR* url = TEXT("C:\\windows\\system32\\calc.exe"); FPlatformPr ...
- 为 Linux 应用程序编写 DLL[转]
自:http://www.ibm.com/developerworks/cn/linux/sdk/dll/index.html 在仅仅只会编写插件的时候为什么要编写整个应用程序? 插件和 DLL 通常 ...