Timeout Exception in Webdriver.dll when running script more than once

Fixed Issue #8252265

Details

Author
James B.
Created
Jul 22, 2016
Privacy
This issue is public.
Reports
Reported by 2 people

Sign in to watch or report this issue.

Steps to reproduce

INDEX FOR CONTENT IN ORDER FOUND
[Summary]
[Notes]
[Exception]
[Stack Trace]
[OS]
[Browser]
[Selenium]
[Edge Driver]
[Visual Studio]
[Script Code]

SUMMARY:
WebDriver, C#, Edge - Timeout Exception in Webdriver.dll

  • Script only able to be executed once. Subsequent attempts result in a time out exception. (stack trace shown below)
  • This script opens Edge, navigates to Bing and finds an element

NOTES:

  • Restarting the OS enables the script to be run once again.
  • Similar code running in a grid configuration requires restarting the node after the script execution to enable the script to be run once again.
  • Similar code using the Java language bindings and Edge works every time. No problems.

EXCEPTION:
OpenQA.Selenium.WebDriverException was unhandled
HResult=-2146233088
Message=The HTTP request to the remote WebDriver server for URL http://localhost:50861/session timed out after 60 seconds.
Source=WebDriver

STACK TRACE -
Exception thrown: ‘OpenQA.Selenium.WebDriverException’ in WebDriver.dll
The HTTP request to the remote WebDriver server for URL http://localhost:51410/session timed out after 60 seconds.
at OpenQA.Selenium.Remote.HttpCommandExecutor.CreateResponse(WebRequest request)
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.Edge.EdgeDriver…ctor(EdgeOptions options)
at OpenQA.Selenium.Edge.EdgeDriver…ctor()
at Bing.Program.Main(String[] args) in C:\Users\jburke\Documents\Visual Studio 2015\Projects\Bing\Bing\Program.cs:line 25
The request was aborted: The operation has timed out.
at System.Net.HttpWebRequest.GetResponse()
at OpenQA.Selenium.Remote.HttpCommandExecutor.CreateResponse(WebRequest request)

OS -
Windows 10 Home
Version 1511
Build 10586.494
64Bit

BROWSER -
Microsoft Edge 25.10586.0.0
Microsoft EdgeHTML 13.10586

SELENIUM -
package id="Selenium.Support" version="2.53.1" targetFramework="net452"
package id="Selenium.WebDriver" version="2.53.1" targetFramework="net452"

EDGE DRIVER -
Microsoft Web Driver Version 2.0.0.0
File Version 10.0.10586.0
Product Version 10.0.10586.0

Microsoft Visual Studio Community 2015
Version 14.0.25424.00 Update 3
Microsoft .NET Framework
Version 4.6.01038

SCRIPT CODE -
https://blogs.windows.com/msedgedev/2015/07/23/bringing-automated-testing-to-microsoft-edge-through-webdriver/
error is occurs at -> driver = new EdgeDriver();

using OpenQA.Selenium;
using OpenQA.Selenium.Edge;
using OpenQA.Selenium.Remote;

namespace EdgeDriverTests
{
public class Program
{
/*
* This assumes you have added MicrosoftWebDriver.exe to your System Path.
* For help on adding an exe to your System Path, please see:
* https://msdn.microsoft.com/en-us/library/office/ee537574(v=office.14).aspx
*/
static void Main(string[] args)
{
RemoteWebDriver driver = null;
try
{
driver = new EdgeDriver();

            // Navigate to Bing
            driver.Url = "https://www.bing.com/";

            // Find the search box and query for webdriver
            var element = driver.FindElementById("sb_form_q");

            element.SendKeys("webdriver");
            element.SendKeys(Keys.Enter);

            Console.ReadLine();
        }
        catch (Exception e)
        {
            Console.WriteLine(e.Message);
        }
        finally
        {
            if (driver != null)
            {
                driver.Quit();
            }
        }
    }
}

}

Attachments

0 attachments

    Comments and activity

    • I have faced the same exact error when I run VS as an admin. When I run VS not as admin the test runs with the script just fine. This is still a problem as in most cases it will need to run with or without admin.

    • Microsoft Edge Team

      Changed Assigned To to “Mara P.”

      Changed Assigned To from “Mara P.” to “Ibrahim O.”

    • I ran as admin when submitting this issue. I have now run without elevated privileges and the script works. Not ideal but it will do for now.

    • Microsoft Edge Team

      Changed Status to “Fixed”

    • Hey James,

      I’m the PM for WebDriver on the Web Platform Team. As you and Jared may have noticed, WebDriver does not work when run from elevation in the 10586 build of Windows 10/WebDriver.

      In the Anniversary Update of Windows 10 along with the Anniversary Update of WebDriver (14393 and 3.14393 respectively) however we do support being run from an elevated context.

      You can find the latest update to WebDriver (and previous versions) on our new landing page for WebDriver.

    You need to sign in to your Microsoft account to add a comment.

    Sign in