您的位置:首页 > 编程语言 > Java开发

selenium java.lang.IllegalStateException: must be set by the webdriver.gecko.driver

2016-12-06 16:40 465 查看
 java.lang.IllegalStateException: The path to the driver executable must be set by
the webdriver.gecko.driver system property; for more information, seehttps://github.com/mozilla/geckodriver

selenium 打开firefox时报错

原因是使用了最新的selenium webdriver版本Selenium
3.x,此版本不支持直接启动firefox,必须要先设置
SystemProperty
 

下载最新版本的geckoDriver 

https://github.com/mozilla/geckodriver/releases

如果github官网不能访问,请参考http://blog.csdn.net/fabbychips/article/details/53488802


Check if Firefox is 32-bit or 64-bit

There are two versions of GeckoDriver for Windows: 32-bit and 64-bit. Based on whether your Firefox is 32-bit or 64-bit, you need to download the corresponding GeckoDriver exe. In this section, you will first check whether
your Firefox is 32-bit or 64-bit
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  geckodriver selenium
相关文章推荐