【问题标题】:I am not able to launch Firefox 0.19.1 in Selenium 3.10.0我无法在 Selenium 3.10.0 中启动 Firefox 0.19.1
【发布时间】:2018-09-05 21:03:32
【问题描述】:

我无法启动 Firefox。我正在使用 Selenium 3.10.0,Firefox 版本是 0.19.1

代码:

public class SampleClass 
    {
        public static void main(String[] args) 
        {
            System.setProperty("webdriver.gecko.driver", "E:\\geckodriver-v0.19.1-win32\\geckodriver.exe");
            WebDriver driver = new FirefoxDriver();
            driver.get("https://www.google.co.in/?gfe_rd=cr&dcr=0&ei=pvK5WsHVGKSIX7qArmA");
        }
    }

错误:

org.openqa.selenium.WebDriverException: java.net.ConnectException: Failed to connect to localhost/127.0.0.1:20603
Build info: version: '3.10.0', revision: '176b4a9', time: '2018-03-02T19:10:56.039Z'

【问题讨论】:

  • selenium 服务器没有运行,或者它没有在端口 20603 上运行。
  • 使用完整的错误堆栈跟踪更新问题。
  • 你试过更新你的FF版本了吗?
  • 硒服务器在运行吗?

标签: java selenium selenium-webdriver automated-tests geckodriver


【解决方案1】:

许多错误是由于驱动程序和浏览器过时造成的。请确保您运行的是最新版本。

将您的 GeckoDriver 更新到最新版本:(应该是 v20) https://github.com/mozilla/geckodriver/releases/download/v0.20.0/geckodriver-v0.20.0-win32.zip

将您的 Firefox 更新到最新版本:(应该是 v59.0.*) https://www.mozilla.org/en-US/firefox/releases/

更新您的 Selenium 服务器:(Java - 应该是 v3.11.0) https://www.seleniumhq.org/download/

【讨论】:

    猜你喜欢
    • 2017-02-25
    • 1970-01-01
    • 2019-09-21
    • 2015-02-28
    • 2016-08-08
    • 2014-01-20
    • 1970-01-01
    • 2017-04-26
    • 1970-01-01
    相关资源
    最近更新 更多