org.openqa.selenium.SessionNotCreatedException:无法创建新服务:GeckoDriverService

时间:2018-01-09 10:45:14

标签: selenium-webdriver selenium-grid

我正在尝试在远程机器上运行selenium Grid的测试,它给了我预测错误

Expection

Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: Unable to create new service: GeckoDriverService Build info: version: '3.8.1', revision: '6e95a6684b', time: '2017-12-01T19:05:32.194Z'

这是我的代码

public static void main(String[] args) throws MalformedURLException {
        // TODO Auto-generated method stub

        String nodeURL;
        String baseURL;
         System.setProperty("webdriver.gecko.driver","C:\\geckodriver-v0.19.1-win64\\geckodriver.exe");
        DesiredCapabilities capabilities = DesiredCapabilities.firefox();
capabilities.setCapability(FirefoxDriver.BINARY,new File("C:\\Program Files\\Mozilla Firefox\\firefox.exe").getAbsolutePath());
 WebDriver driver = new RemoteWebDriver(new URL("http://10.132.48.16:5566/wd/hub"),capabilities );


        driver.get("http://google.com");
           System.out.println(driver.getTitle());

0 个答案:

没有答案