I'm using Selenium Webdriver in Visual Studio 2015, with C#. The browser is IE (not because I want to, but becaue I have to). I'm organizing the tests in a Unit Test project, which calls Selenium in a Class Library project.
As of now, I'm having problems just opening the page I'm trying to test. The page opens, but the Selenium test keeps running until it times out in 2-3 minutes. It times out with this error:
Test failed - ...
Message: Test method Open_Page threw exception:
OpenQA.Selenium.WebdriverException: The HTTP request to the remote
WebDriver server for URL http://localhost:20819/session/f6455....
/timeouts
timed out after 60 seconds. --->
System.Net.WebException: The request was aborted: The operation has timed
out.
TestCleanup method ... threw exception.
OpenQA.Selenium.WebDriverException:
OpenQA.Selenium.WebDriverException: Unexpected error. Error 404: Not
Found
Not Found.
This is my code (I believe the relevant parts, at least). I've simplified it and put the interesting Selenium code in unit test class.
[TestClass]
public class OpenTests {
...
...
...
public void Open_Opus_1 () {
//StartPage.GoTo();
IEDriver.Instance.Navigate().GoToUrl("https://REMOVED/");
}
[TestCleanup]
public void Cleanup() {
IEDriver.Close();
}
The IEDriver class:
public class IEDriver {
public static IWebDriver Instance { get; set; }
public static void Initialize() {
Instance = new InternetExplorerDriver();
}
public static void Close() {
Instance.Close();
}
}
I'm not sure what more information is relevant. What happening is that with this page, which is a very complicated page with lots of service polling and status displays of servers, services etc. etc., the page opens fine, but the test just keeps running until it times out with the above error(s).
If I replace the URL with (ex.) www.google.com, it works fine; the browser closes as the test passes.
So the problem is obviously this specific page. And since it just keeps running and timing out, I'm unable to do anything more. So I'm wondering if it's possible to force Selenium NOT to keep trying for whatever it tries or waits for, and say "the page is loaded now...moving on..."? Or something like that.