【问题标题】:Unable to open mozila firefox 48.2 using selenium webdriver 2.45.0无法使用 selenium webdriver 2.45.0 打开 mozila firefox 48.2
【发布时间】:2016-10-09 22:04:04
【问题描述】:

错误是

无法使用 selenium webdriver 2.45.0 打开 mozila firefox 48.2

这是我的代码:

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;

public class OpenBrowser {

    public static void main(String[] args) throws InterruptedException {

        WebDriver Driver = new FirefoxDriver(); 
        Driver.get("https://www.google.com/");
        Thread.sleep(5000L);
        }

}

【问题讨论】:

标签: java selenium firefox


【解决方案1】:

47 之后的 Firefox 版本与低于 2.53 的 Selenium 版本不兼容(包括在内) 因此,您需要下载 selenium3 beta 并配置 geckodriver 以运行 firefox(就像使用 chromedriver. https://github.com/mozilla/geckodriver/releases

【讨论】:

  • 谢谢。现在我明白了。
猜你喜欢
  • 1970-01-01
  • 2014-10-28
  • 1970-01-01
  • 2020-06-26
  • 2017-10-23
  • 1970-01-01
  • 2020-08-03
  • 2016-04-03
  • 2017-05-24
相关资源
最近更新 更多