未能在45000启动插座 [英] Failed to start up socket within 45000
问题描述
我使用FF 19版
这是所有工作的罚款,直到昨天突然今日早盘我开始得到这个错误,我有完全相同的代码,这是运行前,没有改变什么。
错误消息:
测试玛:.TestCases.12'失败:无法启动内45000
OpenQA.Selenium.WebDriverException插座:无法在OpenQA.Selenium.Firefox.Internal.ExtensionConnection.ConnectToBrowser启动内45000
插槽(在OpenQA.Selenium.Firefox.FirefoxDriver.StartClient Int64的timeToWaitInMilliSeconds)
在OpenQA.Selenium.Firefox.Internal.ExtensionConnection.Start()
()
在OpenQA.Selenium.Remote.RemoteWebDriver。 .ctor(ICommandExecutor commandExecutor,ICapabilities desiredCapabilities)
在OpenQA.Selenium.Firefox.FirefoxDriver..ctor(FirefoxBinary二进制,FirefoxProfile轮廓,时间跨度的CommandTimeout)
在OpenQA.Selenium.Firefox.FirefoxDriver..ctor( FirefoxBinary二进制,在OpenQA.Selenium.Firefox.FirefoxDriver..ctor FirefoxProfile配置文件)
(FirefoxProfile配置文件)
0过去了,1失败,0跳过了145.80秒(临时)。
下面是我的源代码:
公共静态IWebDriver GetDriver()
{
开关(Common.BrowserSelected)
{
案FF:
FirefoxProfile简介=新FirefoxProfile();
profile.SetPreference(network.http.phishy,为userpass长,255);
profile.SetPreference(network.automatic-NTLM的auth.trusted-URI的URL);
DRV =新FirefoxDriver(配置文件);
中断;
的情况下,即:
变种选项=新InternetExplorerOptions();
options.IntroduceInstabilityByIgnoringProtectedModeSettings = TRUE;
DesiredCapabilities能力=新DesiredCapabilities();
capabilities.SetCapability(CapabilityType.AcceptSslCertificates,真);
DRV =新InternetExplorerDriver(选件);
中断;
案铬:
// _司机=新ChromeDriver();
中断;
}
返回DRV;
}
火狐19支持是在硒的最新版本中增加的。所以,既然你使用的是.NET,直接下载最新的这个帖子的时间的版本为2.31.2:
<一个HREF =http://selenium-release.storage.googleapis.com/index.html> selenium-release.storage.googleapis.com/index.html
I'm using FF version 19
it was all working fine till yesterday and suddenly today morning i start getting this error and i have the same exact code that was running before, no change nothing
error message:
Test 'M:.TestCases.12' failed: Failed to start up socket within 45000
OpenQA.Selenium.WebDriverException: Failed to start up socket within 45000
at OpenQA.Selenium.Firefox.Internal.ExtensionConnection.ConnectToBrowser(Int64 timeToWaitInMilliSeconds)
at OpenQA.Selenium.Firefox.Internal.ExtensionConnection.Start()
at OpenQA.Selenium.Firefox.FirefoxDriver.StartClient()
at OpenQA.Selenium.Remote.RemoteWebDriver..ctor(ICommandExecutor commandExecutor, ICapabilities desiredCapabilities)
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(FirefoxProfile profile)
0 passed, 1 failed, 0 skipped, took 145.80 seconds (Ad hoc).
here is my source code:
public static IWebDriver GetDriver()
{
switch (Common.BrowserSelected)
{
case "ff":
FirefoxProfile profile = new FirefoxProfile();
profile.SetPreference("network.http.phishy-userpass-length", 255);
profile.SetPreference("network.automatic-ntlm-auth.trusted-uris", url);
drv = new FirefoxDriver(profile);
break;
case "ie":
var options = new InternetExplorerOptions();
options.IntroduceInstabilityByIgnoringProtectedModeSettings = true;
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.SetCapability(CapabilityType.AcceptSslCertificates, true);
drv = new InternetExplorerDriver(options);
break;
case "chrome":
//_driver = new ChromeDriver();
break;
}
return drv;
}
Firefox 19 'support' was added in Selenium's latest versions. So since you are using .NET, the direct download for the latest at the time of this post is version 2.31.2:
selenium-release.storage.googleapis.com/index.html
这篇关于未能在45000启动插座的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!