Selenium java.lang.IllegalStateException: The path to the driver executable must be set by the webdriver.gecko.driver system property; for more information, see.

Java.lang.IllegalStateException: The path to the driver executable must be set by the webdriver.gecko.driver system property; for more information, see

selenium 打开firefox时报错

原因是使用了最新的selenium webdriver版本

48以后的firefox不能直接启动,必需先设置System.setProperty("webdriver.gecko.driver", "geckoDriver.exe路径");

下载最新版本的geckoDriver 

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

posted @ 2017-02-24 15:04  游鱼迁徙  阅读(1051)  评论(0编辑  收藏  举报