I created some selenium tests which work pretty fine on localhost, but when I deploy the application on appharbor, I'm getting an exception thrown.
This code throws the exception on creating a new instance of InternetExplorerDriver:
var options = new InternetExplorerOptions();
options.IntroduceInstabilityByIgnoringProtectedModeSettings = true;
Driver = new InternetExplorerDriver(DriverDirectory, options);
Here is the exception:
OpenQA.Selenium.WebDriverException: Cannot start the driver service on http://localhost:35187/
at OpenQA.Selenium.DriverService.Start()
at OpenQA.Selenium.Remote.DriverServiceCommandExecutor.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.IE.InternetExplorerDriver..ctor(String internetExplorerDriverServerDirectory, InternetExplorerOptions options)
...
Could you please advice what could be the reason and is there any way to solve it?
The port 333 specified for the InternetExplorerDriverService falls within the well-known-port-numbers range:
Check a couple of things: