得到以下错误
org.openqa.selenium.firefox.NotConnectedException
Firefox:32.0
Eclipse:版本:Neon.1a版本(4.6.1)
答案 0 :(得分:0)
升级你的firefox你需要从这个链接安装geckodriver:
Gecko driver download from here
然后设置setProperty()
System.setProperty("webdriver.gecko.driver", "E:\\software and tools\\geckodriver.exe");
WebDriver driver = new FirefoxDriver();
driver.get("http://www.google.com");
如果您使用selenium jar 2.53和浏览器firefox 45.0,则无需设置gecko驱动程序:
WebDriver driver = new FirefoxDriver();
driver.get("http://www.google.com");