1

I am stuck on a problem that I have relatively no sight of whats causing the error.

After doing research I can see that this is a common issue, yet none of the solutions apply or work for me.

Selenium Error - The HTTP request to the remote WebDriver timed out after 60 seconds - this does not apply because a. there is no AddArgument method for IE options to add no-sandbox and B. my I.E. Initally opens up to the default website I provided, yet once open does not move on from explorer.Driver = new InternetExplorerDriver(explorer.Options);

https://sqa.stackexchange.com/questions/13326/the-http-request-to-the-remote-webdriver-server-timed-out-after-60-seconds - my page is loaded, yet still timing out so this does not help.

The HTTP request to the remote WebDriver server for URL - Chrome - again the no sandbox option does not help, however it does note that a possible cause is browser/webdriver mismatch but I have latest IE and latest Selenium.Webdriver.IExplorer

On the seleniumhq site i was able to find the below however I read that this was taken care of in a recent update to selenium

Once again, the language bindings (your C# code) use HTTP to communicate with the browser driver (chromedriver.exe, geckodriver.exe, IEDriverServer.exe, etc.). It initiates a session with the driver by sending a POST to http://localhost:(some port value)/session. The WebDriver wire protocol is JSON-over-HTTP, so every command issues an HTTP call to localhost. As for why sessions aren’t being created, I do not know. It’s unlikely that the Selenium project will be able to narrow down what the issue is. I’m certain it’s entirely dependent on the environment, being run under IIS. Beyond that, I do not have the ability or environment to narrow it down further.

Can anyone please help?? This is frustrating because it seems like every 15-20 re-builds i get it to initalize fully to where my code goes into the next method and logs in.

heres my code

private void btnInitalize_Click(object sender, EventArgs e)
{
    Cursor = Cursors.AppStarting;
    explorer = Initalizer.InitalizeRerouter();
    explorer.Driver.FindElementByName("userID").Click();
    explorer.Driver.FindElementByName("userID").SendKeys("classified");
    explorer.Driver.FindElementByName("userPassword").Click();
    explorer.Driver.FindElementByName("userPassword").SendKeys("classified");
    explorer.Driver.FindElementByName("Login").Click();
    Cursor = Cursors.Arrow;
}

this is in a different class

public static IExplorerModel InitalizeRerouter()
{
    IExplorerModel explorer = new IExplorerModel();

    explorer.Options = new InternetExplorerOptions();
    explorer.Options.IntroduceInstabilityByIgnoringProtectedModeSettings = true;
    explorer.Options.InitialBrowserUrl = @"http://plzhelp/hi/login.asp";
    explorer.Options.EnsureCleanSession = true;
    explorer.Driver = new InternetExplorerDriver(explorer.Options);
    return explorer;
}

here is the error code

The HTTP request to the remote WebDriver server for URL http://localhost:52438/session timed out after 60 seconds.'

I should also note that everytime it boots, it loads on a different port. Not sure if it matters but I had a thought that maybe im only able to connect on a specific port but I do not see anywhere to set a port

error stack trace as requested

   at OpenQA.Selenium.Remote.HttpCommandExecutor.MakeHttpRequest(HttpRequestInfo requestInfo)
   at OpenQA.Selenium.Remote.HttpCommandExecutor.Execute(Command commandToExecute)
   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(InternetExplorerDriverService service, InternetExplorerOptions options)
   at OpenQA.Selenium.IE.InternetExplorerDriver..ctor(InternetExplorerOptions options)
   at RouteGuidesBiach.Classes.Initalizer.InitalizeRerouter() in C:\Users\u694172\source\repos\RouteGuidesBiach\RouteGuidesBiach\Classes\Initalizer.cs:line 26

update:

When I already have a IE.exe process running, and I try to initalize webdriver, it will actually work... no clue why

boo
  • 109
  • 1
  • 12
  • Update the question with the complete error stack trace – DebanjanB Dec 04 '18 at 19:20
  • Okay I added it hopefully thats what you meant. – boo Dec 04 '18 at 19:26
  • You have identified it correct. Can you paste the complete error stack trace? – DebanjanB Dec 04 '18 at 19:28
  • I have a really strange situation... , but whenever I already have an internet explorer session running, it works... Which doesnt make sense. If i end all of my iexplorer processes, and try to initalize I get the error – boo Dec 04 '18 at 19:49
  • Also could you explain an easy way to paste the complete error stack trace? I tried ex.Tostring() which is whats in my post. then i tried to loop through the stacktrace.GetFrames() and it doesn't look like what you want. – boo Dec 04 '18 at 19:49
  • Paste the entire raw error logs within the question area. – DebanjanB Dec 04 '18 at 19:56

0 Answers0