我试图使用webdriver启动Chrome浏览器(版本26.0)。 我收到以下错误消息。启动Chrome浏览器
Exception in thread "main" java.lang.IllegalStateException: The path to the driver executable must be set by the webdriver.chrome.driver system property; for more information, see http://code.google.com/p/selenium/wiki/ChromeDriver.
at com.google.common.base.Preconditions.checkState(Preconditions.java:176)
at org.openqa.selenium.remote.service.DriverService.findExecutable(DriverService.java:105)
at org.openqa.selenium.chrome.ChromeDriverService.createDefaultService(ChromeDriverService.java:69)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:107)
at googleSearch.main(googleSearch.java:13)
码我用:
driver = new ChromeDriver();
driver.navigate().to("http://www.google.com/");
我使用的是Mac 10.8.2。
你确定你有'''-Dwebdriver.chrome。driver ='/ path/to/driver''''设置是否正确? – luksch
错误消息告诉您_webdriver.chrome.driver系统属性_有问题,然后建议_有关更多信息,请参阅http://code.google.com/p/selenium/wiki/ChromeDriver_。你看过那个,你觉得有用吗? –