代码之家  ›  专栏  ›  技术社区  ›  Kuba Kolybacz

FirefoxDriver不启动任何URL并执行任何操作

  •  1
  • Kuba Kolybacz  · 技术社区  · 7 年前

    我已经用Eclipse Neon、最新的Selenium 3.7.1和Firefox 52.4创建了一个清晰的CentOS。 我试图调用任何URL,但Firefox启动后什么也不做。我没有任何代理。

    我试图用以下默认页面启动Firefox:

    FirefoxProfile fp = new FirefoxProfile();
    fp.setPreference("browser.startup.homepage", URL);
    fp.setPreference("startup.homepage_welcome_url", URL);
    fp.setPreference("startup.homepage_welcome_url.additional", URL);
    

    它成功了,但只打开了页面,没什么了。

    这是常见问题吗?我怎样才能解决这个问题?

    1 回复  |  直到 7 年前
        1
  •  0
  •   undetected Selenium    7 年前

    你提到使用 Selenium 3.7.1 and Firefox 52.4 .

    的发行说明 GeckoDriver 明确提到:

    Note that with geckodriver 0.19.0 the following versions are recommended: - Firefox 55.0 (and greater) - Selenium 3.5 (and greater)

    因此,当您使用时, Selenium 3.7.1 你不能在下面使用 geckodriver 0.19.0 . 因此,你的解决方案是提高你的 Firefox v56.x 数量