简体   繁体   English

Selenium FireFox驱动程序异常

[英]Selenium FireFox Driver Exception

I had a number of Selenium tests written using the Firefox driver which worked fine. 我使用Firefox驱动程序编写了许多Selenium测试,效果很好。 But for some reason now I am getting an exception when trying to instantiate the Firefox driver. 但是由于某种原因,在尝试实例化Firefox驱动程序时出现了异常。 Does anybody know of any updates Firefox have made that might have affected this? 有人知道Firefox所做的任何更新可能会影响到此吗?

Here are the two lines of code. 这是两行代码。 The exception occurs on the 2nd line:- 例外发生在第二行:

private IWebDriver _webDriver;
_webDriver = new FirefoxDriver();

Below is the exception I ham getting:- 以下是我很想得到的例外:-

"An exception of type 'OpenQA.Selenium.WebDriverException' occurred in WebDriver.dll but was not handled in user code “ WebDriver.dll中发生类型'OpenQA.Selenium.WebDriverException的异常,但未在用户代码中处理

Additional information: Failed to start up socket within 45000 ms 附加信息:无法在45000毫秒内启动套接字

If there is a handler for this exception, the program may be safely continued." 如果存在用于此异常的处理程序,则可以安全地继续执行该程序。”

I had the same error recently. 我最近有同样的错误。 Are you using the port for some other application as well? 您是否还在将端口用于其他应用程序?

The topic was already discussed right here: Selenium WebDriver - FirefoxDriver error: Failed to start up socket within 45000 ; 此处已经讨论了该主题: Selenium WebDriver-FirefoxDriver错误:无法在45000范围内启动套接字 the solution was not the port, but some other possibility. 解决方案不是端口,而是其他可能性。 Might want to check it out. 可能想检查一下。

Greetz, me. 格蕾兹,我。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM