【问题标题】:org.openqa.selenium.firefox.NotConnectedException with Selenium Java 3.0.1 Firefox version 51.0.1org.openqa.selenium.firefox.NotConnectedException 与 Selenium Java 3.0.1 Firefox 版本 51.0.1
【发布时间】:2017-02-06 05:58:36
【问题描述】:

org.openqa.selenium.firefox.NotConnectedException with selenium java 3.0.1 火狐51.0.1版。

我正在尝试使用 Gecko 驱动程序。

这是我的代码

public class Gecko {
   String driverPath = "/home/hema/Downloads/Softwares";
   WebDriver driver;

   @org.junit.Test
   public void Test() {
     System.setProperty("webdriver.firefox.marionette", driverPath + "/geckodriver.exe");
     DesiredCapabilities capabilities = DesiredCapabilities.firefox();
     capabilities.setCapability("marionette", true);
     driver = new FirefoxDriver(capabilities);
     driver.get("http://awsstagewebdriver.doctorinsta.com");
  }
  @After
  public void tearDown(){
    driver.close();
  }
}

依赖

<dependencies>
    <dependency>
        <groupId>org.seleniumhq.selenium</groupId>
        <artifactId>selenium-server</artifactId>
        <version>3.0.1</version>
    </dependency>
    <dependency>
        <groupId>org.seleniumhq.selenium</groupId>
        <artifactId>selenium-java</artifactId>
        <version>3.0.1</version>
    </dependency>
</dependencies>

【问题讨论】:

  • 您使用的是哪个版本的 geckodriver?

标签: java maven selenium firefox selenium-webdriver


【解决方案1】:

请将 Firefox 版本 51.0.1 降级到 46.0.1。

【讨论】:

    猜你喜欢
    • 2017-07-28
    • 2017-06-18
    • 2017-06-30
    • 2018-12-31
    • 2016-08-13
    • 2016-01-06
    • 2018-04-14
    • 1970-01-01
    • 2023-03-29
    相关资源
    最近更新 更多