小编典典

Firefox WebDriver不适用于Firefox 32

selenium

我刚刚更新到Firefox 32,当我尝试运行Selenium Webdriver Test时,我得到以下信息

Failed to start up socket within 45000 ms. Attempted to connect to the
following addresses: 127.0.0.1:7055 OpenQA.Selenium.WebDriverException
was unhandled by user code   HResult=-2146233088   Message=Failed to
start up socket within 45000 ms. Attempted to connect to the following
addresses: 127.0.0.1:7055   Source=WebDriver   StackTrace:
       at OpenQA.Selenium.Firefox.FirefoxDriverServer.ConnectToBrowser(TimeSpan
timeToWait)
       at OpenQA.Selenium.Firefox.FirefoxDriverServer.Start()
       at OpenQA.Selenium.Firefox.FirefoxDriverCommandExecutor.Execute(Command
commandToExecute)
       at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
       at OpenQA.Selenium.Remote.RemoteWebDriver.StartSession(ICapabilities
desiredCapabilities)
       at OpenQA.Selenium.Remote.RemoteWebDriver..ctor(ICommandExecutor
commandExecutor, ICapabilities desiredCapabilities)
       at OpenQA.Selenium.Firefox.FirefoxDriver..ctor(FirefoxBinary binary, FirefoxProfile profile, ICapabilities capabilities, TimeSpan
commandTimeout)
       at OpenQA.Selenium.Firefox.FirefoxDriver..ctor(FirefoxBinary binary, FirefoxProfile profile, TimeSpan commandTimeout)
       at OpenQA.Selenium.Firefox.FirefoxDriver..ctor(FirefoxBinary binary, FirefoxProfile profile)
       at OpenQA.Selenium.Firefox.FirefoxDriver..ctor()
       at SMT.Web.FunctionalTests.Drivers.Driver.GetWebDriver(Int32 browser, String page)

我期望能够正常运行测试。

有没有人遇到过同样的事情?您是如何解决该问题的?

selenium版本:2.41.0(作为Nuget软件包安装)操作系统:Windows 7浏览器:Firefox浏览器版本:32


阅读 338

收藏
2020-06-26

共1个答案

小编典典

Selenium2.41.0正式支持的最新Firefox版本是
28 。降级您的浏览器。根据其他答案,降级到Firefox 31足以使其正常运行。

最好安装最新的硒包。但是,该策略始终相同-确保您使用的是硒包浏览器支持的版本。

2020-06-26