Exception stack trace:
OpenQA.Selenium.WebDriverException: Failed to start up socket within 45000 ms. Attempted to connect to the following addresses: 127.0.0.1:7055 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 DtvAutomation.Selenium.Api.SeleniumFirefoxTest.CreateWebDriver() at DtvAutomation.Selenium.Api.SeleniumTest'1.Run()
The code that throws the exception is calling the Firefox WebDriver constructor:
protected override FirefoxDriver CreateWebDriver()
{
lock(this.syncRoot)
{
var ffBinary = new FirefoxBinary();
var ffProfile = new FirefoxProfile();
return new FirefoxDriver(
binary: ffBinary,
profile: ffProfile,
commandTimeout: TimeSpan.FromMinutes(2));
}
}
I am using selenium 2.46 (via NuGet package) from a Visual Studio 2013 - "WCF Application Service" project. Firefox is 38.0.5 (latest). When I start the WCF from Visual Studio (debug mode) everything works fine - no exceptions. When I publish the WCF to local IIS it throws this error.
I tried the following things:
- Updated NuGet packages - make sure I'm up-to-date
- Downgraded Firefox to version 34.0.5
- Upgraded Firefox to latest version
- Opened port 7055 from firewall
- Change credentials for IIS application / app-pool, used the Administrator account
- On exception, re-try to initialize WebDriver using another port
None of these seem to work. Any ideas what could be the problem?