用于 Firefox 的 Selenium WebDriver [重复]

Posted

技术标签:

【中文标题】用于 Firefox 的 Selenium WebDriver [重复]【英文标题】:Selenium WebDriver for Firefox [duplicate] 【发布时间】:2016-10-21 12:34:31 【问题描述】:

我对 Selenium WebDriver 有一些问题。 我正在使用最新的 firefox 版本(47.0)并绑定使用最后一个 Selenium-Server-standalone-2.53.0.jar 但是当我使用以下代码使用此版本时:

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

    public class Test 

        public static void main(String[] args) 

            WebDriver driver = new FirefoxDriver();

firefox 无法打开 我收到消息说有问题,我可以调试 firefox。

当我尝试使用 selenium-server-standalone-2.44.0.jar 时,firefox 窗口会打开,但它不是空白的,也不会转到我想要的一侧,例如 driver.get("https://www.google.com" );

我收到以下错误:

org.openqa.selenium.firefox.NotConnectedException:无法连接 45000 毫秒后在端口 7055 上托管 127.0.0.1。火狐。

【问题讨论】:

【参考方案1】:

Selenium 2.53 不支持 Firefox 47。以下是更多信息: Selenium 2.53 not working on Firefox 47

您必须将 Firefox 降级到 46 版本。请记住禁用自动更新。

【讨论】:

以上是关于用于 Firefox 的 Selenium WebDriver [重复]的主要内容,如果未能解决你的问题,请参考以下文章

Firefox Build 不适用于 Selenium

Selenium 2.53 不适用于 Firefox 28

Selenium 2.53 不适用于 Firefox 47

用于 Firefox 的 Selenium WebDriver [重复]

selenium不适用于Firefox或Chrome

Selenium Web 驱动程序 Firefox 打开空白页