WebDriver Firefox驱动程序不起作用

时间:2014-07-16 15:06:24

标签: c# firefox webdriver

我正在使用selenium webdriver 2.42.0,Firefox 29,C#并尝试创建firefox驱动程序

FirefoxProfile fp = new FirefoxProfile();

driver = new FirefoxDriver(new FirefoxBinary("C:\\Program Files (x86)\\Mozilla    Firefox\\firefox.exe"), fp);

我看到一个新的Firefox窗口并获得WebDriverException

 Failed to start up socket within 45000 ms. Attempted to connect to the following addresses: 127.0.0.1:7055

使用ChromeDriver和IE驱动程序,一切正常。我发现的唯一建议是检查FF和selenium版本,但据我所知FF29和webdriver 2.42应该一起工作。 我也尝试使用FF27,28,30,没什么用。

1 个答案:

答案 0 :(得分:-2)

将您的selenium升级到更新版本。如果您使用Maven,请访问https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-java