July 23, 2015 12:00 pm

Bringing automated testing to Microsoft Edge through WebDriver

Today we’re announcing support for automated testing of Microsoft Edge through the W3C WebDriver standard. To use WebDriver with Microsoft Edge, you need the MicrosoftWebDriver server on a Windows Insiders build of 10240 or newer.

WebDriver is an emerging standard through which Web developers can write tests to automate Web browsers for site testing. It provides a programmable remote control for developing complex user scenarios and running them in an automated fashion against your website in a browser. WebDriver is used by top web properties like Bing, Azure, SharePoint, Facebook, Google, and others to automate testing their sites within a browser. With this new capability, Microsoft Edge can be run through the same regression testing as other browsers, helping developers identify issues with less effort and making sites just work for our end users.

As we described in “Building a more interoperable Web with Microsoft Edge,” the Web is built on the principle of multiple independent, interoperable implementations of web standards, and true interoperability means that all web content, browsers, and specifications should align to the same well-defined behavior. Keeping that principle in mind, our implementation supports both the W3C WebDriver specification and the JSON Wire Protocol. The Browser Testing and Tools working group has been doing a great job of standardizing automation testing interfaces as a part of the emerging WebDriver specification. For backwards compatibility with existing tests, we have implemented the JSON Wire Protocol, so existing tests should also just work. We’re not done yet, as the WebDriver specification is still in an early stage of standardization, and we still have more features to implement. You can find out more about all of the WebDriver interfaces we have implemented on our Platform Status page here.

Borland contributions to Microsoft Edge

MicroFocus Borland logoMicrosoft has a long history of collaborating with industry technology leaders to bring the best-in-class experiences. In order to truly build an interoperable implementation that our customers can use, we have partnered with the Borland Silk team from Micro Focus, an industry leader in automation testing tools, to help contribute code to the WebDriver implementation in Microsoft Edge. The Borland team is also bringing their expertise in automation testing to help inform the next level of changes we should pursue in the W3C standard. Our thanks to the Borland team for all of their help in making the Web better!

How WebDriver works

To get started using WebDriver, you will need to download a testing framework of your choice along with an appropriate language binding and the MicrosoftWebDriver server.

WebDriver is disabled by default for security. In order to enable using WebDriver, you will need to download and install the MicrosoftWebDriver in a location with your test repository. You should be able to use Microsoft Edge’s WebDriver implementation just like you would use any other browser’s implementation.

Diagram of WebDriver and Microsoft Edge

Here’s an example of C# code opening a new browser Window, navigating to http://www.bing.com and searching webdriver.

We’re excited to deliver WebDriver in Microsoft Edge and look forward to hearing what you think! Take it for a spin and share your feedback in the comments below or @MSEdgeDev on Twitter.

Clay Martin, Program Manager, Microsoft Edge
John Jansen, Principal Software Engineer, Microsoft Edge
Jatinder Mann, Senior Program Manager Lead, Microsoft Edge
– Mark Conway, Director, Micro Focus

Join the conversation

  1. The MicrosoftWebDriver server is now online again and can be downloaded here: http://www.microsoft.com/en-us/download/details.aspx?id=48212

    The previous binary (posted last night) was unsigned – this version is now signed by Microsoft. If you installed the previous binary, you can replace it with this version by first uninstalling the original (under Add/Remove Programs) and replacing it with the above.

  2. Hi guys,

    I want to test the new Edge Driver. I have installed the latest version of the WebDriver NuGet. However, the “using OpenQA.Selenium.Edge;” is not present in it. Can you give me further directions what I need to do to run your example?

    Thank you!

  3. Per the information about submitting updates to C# and Java Selenium language bindings, I’ve downloaded the latest version v2.46 for C#. I could not find any namespace OpenQA.Selenium.Edge in WebDriver.dll. Am I missing something?

  4. It is really good to hear that Webdriver support for Microsoft Edge is available. But at this stage I believe it is too immature to use it. Most of the method in Webdriver is not supported in the new edge driver. A very common example would by findElementByXpath. I was working with java and Webdriver. Due to this existing scripts developed in IE may need lots of refactoring.
    But Yes I believe these will be fixed soon.
    On the other hand comparing with IE I felt that the browser is pretty fast .And also automating this seems to be simplified now wherein we usually use lots of hacks while automating the IE browsers earlier. So that is +1 for edge.
    Still working with Edge to find more on Selenium support

  5. While I agree that EDGE is faster than IE11, however where it comes to automating browser I was finding difficulty configuring the Microsoft Webdriver to selenium GRID. it see the microsoft webdriver always listening on localhost:17556 port and when tried to configure on GRID i was getting server response code : 400. while the command executes fine from http://dev.modern.ie/testdrive/demos/webdriver/ invoking them remotely was challenge for me

  6. Better if we could start WebDriver-enabled Edge in InPrivate mode. Without InPrivate, we will need to manually kill cookies, IndexedDB, Local Storage, etc.

    • I think the mistake i did was to start the Microsoft Webdriver from command line and then trying to forward the request. configuring EDGE node on hub is no diff than how I was doing it for chrome and ie. for less mortals like me here is snippet

      set seleniumjar=selenium-server-standalone-2.47.1.jar
      # Start Selenium hub
      start /MIN java -jar %seleniumjar% -port 4444 -timeout 1200 -newSessionWaitTimeout 150000 -browserTimeout 100 -role hub

      start /MIN java -Dwebdriver.edge.driver=”C:\Program Files (x86)\Microsoft Web Driver\MicrosoftWebDriver.exe” -jar %seleniumjar% -role node -port %port% -browser browserName=”MicrosoftEdge”,maxInstances=5 -hub %hub_url_local%

      • Hey ,
        I tried the above command to configure it to hub , but after MicrosoftEdge opens, the command prompt shuts down the server, do you know if it is something coded in MicrosoftEdge driver and if there is any workaround to keep ti running continuously ?

  7. I just tried to make the driver listen on a non-localhost interface.
    –host=localhost works as expected.
    –host= fails with “HttpAddUrlToUrlGroup failed with 5”
    –host= fails with “HttpAddUrlToUrlGroup failed with 5”
    Adding that ip to the hosts file doesn’t work either.

    Any ideas?

    • Did you use an elevated command prompt? Or run the batch file as administrator? The error “HttpAddUrlToUrlGroup failed with 5” showed up when the command was not ran as administrator.

  8. I was trying to find the element by link text webDriver.findElements(By.linkText(… and I was getting error, its not clear which location startegy excpet Id is supported by microsoft webdriver.

    class name
    css selector
    id – supported
    link text
    partial link text
    tag name

  9. I uses webdriver2.47 and newest MicrosoftWebDriver.exe,but i can’t get element by using executeScript.

  10. Running the code as you’ve put it in the repository does not work.
    Repro steps.
    Install web driver from links provided.
    Create console app.
    Nuget in Selenium.WebDriver, Selenium.Support.
    Run code, console window comes up fine.
    When code hits the driver.Url=”https://www.bing.com” it throws an exception, as noted below.
    NoSuchWindowException – An unhandled exception of type ‘OpenQA.Selenium.NoSuchWindowException’ occurred in WebDriver.DLL


    Healy in Tampa

  11. Using Edge Browser 20.10240.16384.0 : WebDriver 10.0.10240.0 this code generate an error: An exception of type ‘OpenQA.Selenium.WebDriverException’ occurred in WebDriver.dll but was not handled in user code
    Additional information: The HTTP request to the remote WebDriver server for URL
    http://localhost:51421/session timed out after 60 seconds.

  12. Attempting to select a checkbox generate an unknown error.


    IWebElement element = driver.FindElement(by);
    SelectElement select = new SelectElement(element);

    An exception of type ‘System.InvalidOperationException’ occurred in WebDriver.dll but was not handled in user code
    Additional information: unknown error
    at OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError(Response errorResponse) in c:\Projects\webdriver\dotnet\src\webdriver\Remote\RemoteWebDriver.cs:line 1126
    at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters) in c:\Projects\webdriver\dotnet\src\webdriver\Remote\RemoteWebDriver.cs:line 920
    at OpenQA.Selenium.Remote.RemoteWebDriver.InternalExecute(String driverCommandToExecute, Dictionary`2 parameters) in c:\Projects\webdriver\dotnet\src\webdriver\Remote\RemoteWebDriver.cs:line 781
    at OpenQA.Selenium.Remote.RemoteWebElement.Execute(String commandToExecute, Dictionary`2 parameters) in c:\Projects\webdriver\dotnet\src\webdriver\Remote\RemoteWebElement.cs:line 867
    at OpenQA.Selenium.Remote.RemoteWebElement.GetAttribute(String attributeName) in c:\Projects\webdriver\dotnet\src\webdriver\Remote\RemoteWebElement.cs:line 381
    at OpenQA.Selenium.Support.UI.SelectElement..ctor(IWebElement element) in c:\Projects\webdriver\dotnet\src\support\UI\SelectElement.cs:line 55
    at SeleniumWebDriver.UserExtensions.Select(IWebDriver driver, By by, String option) in z:\RegressNet\ASNA.QA.Testing.Tools\ASNA.QA.Selenium.WebDriver\UserExtensions.cs:line 394
    at SeleniumWebDriver.UserExtensions.Select(IWebDriver driver, String elementId, String option) in z:\RegressNet\ASNA.QA.Testing.Tools\ASNA.QA.Selenium.WebDriver\UserExtensions.cs:line 388
    at SeleniumTest.Case7471.Case7471_A(IWebDriver driver) in z:\RegressNet\ASNA.QA.Testing.Tools\ASNA.QA.Selenium.WebDriver.UnitTests\case07471.cs:line 84
    at SeleniumTest.Case7471.WebTest_Case7471_Main() in z:\RegressNet\ASNA.QA.Testing.Tools\ASNA.QA.Selenium.WebDriver.UnitTests\case07471.cs:line 31

    • By.XPath is not implemented:
      string elementLocator = “//” + element + “[@id='” + elementId + @”‘]”;
      string result = driver.FindElement(By.XPath(elementLocator)).GetAttribute(attribute);

      An exception of type ‘System.InvalidOperationException’ occurred in WebDriver.dll but was not handled in user code
      Additional information: Locator not implemented
      at OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError(Response errorResponse) in c:\Projects\webdriver\dotnet\src\webdriver\Remote\RemoteWebDriver.cs:line 1126
      at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters) in c:\Projects\webdriver\dotnet\src\webdriver\Remote\RemoteWebDriver.cs:line 920
      at OpenQA.Selenium.Remote.RemoteWebDriver.FindElement(String mechanism, String value) in c:\Projects\webdriver\dotnet\src\webdriver\Remote\RemoteWebDriver.cs:line 954
      at OpenQA.Selenium.Remote.RemoteWebDriver.FindElementByXPath(String xpath) in c:\Projects\webdriver\dotnet\src\webdriver\Remote\RemoteWebDriver.cs:line 700
      at OpenQA.Selenium.By.c__DisplayClasse.b__c(ISearchContext context) in c:\Projects\webdriver\dotnet\src\webdriver\By.cs:line 167
      at OpenQA.Selenium.By.FindElement(ISearchContext context) in c:\Projects\webdriver\dotnet\src\webdriver\By.cs:line 309
      at OpenQA.Selenium.Remote.RemoteWebDriver.FindElement(By by) in c:\Projects\webdriver\dotnet\src\webdriver\Remote\RemoteWebDriver.cs:line 330
      at SeleniumWebDriver.UserExtensions.GetAttributeById(IWebDriver driver, String element, String elementId, String attribute) in z:\RegressNet\ASNA.QA.Testing.Tools\ASNA.QA.Selenium.WebDriver\UserExtensions.cs:line 170
      at SeleniumWebDriver.UserExtensions.CalendarSimpleTest(IWebDriver driver, String buttonID, String fieldID) in z:\RegressNet\ASNA.QA.Testing.Tools\ASNA.QA.Selenium.WebDriver\UserExtensions.cs:line 215
      at SeleniumTest.Case10775.TestCase(IWebDriver driver, String formId, String dateFieldID) in z:\RegressNet\ASNA.QA.Testing.Tools\ASNA.QA.Selenium.WebDriver.UnitTests\case10775.cs:line 67
      at SeleniumTest.Case10775.Case10775_A(IWebDriver driver) in z:\RegressNet\ASNA.QA.Testing.Tools\ASNA.QA.Selenium.WebDriver.UnitTests\case10775.cs:line 49
      at SeleniumTest.Case10775.WebTest_Case10775_Main() in z:\RegressNet\ASNA.QA.Testing.Tools\ASNA.QA.Selenium.WebDriver.UnitTests\case10775.cs:line 37

  13. driver.SwitchTo().DefaultContent();
    An exception of type ‘System.NotImplementedException’ occurred in WebDriver.dll but was not handled in user code
    Additional information: not implemented
    at OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError(Response errorResponse) in c:\Projects\webdriver\dotnet\src\webdriver\Remote\RemoteWebDriver.cs:line 1113
    at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters) in c:\Projects\webdriver\dotnet\src\webdriver\Remote\RemoteWebDriver.cs:line 920
    at OpenQA.Selenium.Remote.RemoteWebDriver.InternalExecute(String driverCommandToExecute, Dictionary`2 parameters) in c:\Projects\webdriver\dotnet\src\webdriver\Remote\RemoteWebDriver.cs:line 781
    at OpenQA.Selenium.Remote.RemoteTargetLocator.DefaultContent() in c:\Projects\webdriver\dotnet\src\webdriver\Remote\RemoteTargetLocator.cs:line 133
    at SeleniumTest.Case13399.Case13399_A(IWebDriver driver) in z:\RegressNet\ASNA.QA.Testing.Tools\ASNA.QA.Selenium.WebDriver.UnitTests\case13399.cs:line 42
    at SeleniumTest.Case13399.WebTest_Case13399_Main() in z:\RegressNet\ASNA.QA.Testing.Tools\ASNA.QA.Selenium.WebDriver.UnitTests\case13399.cs:line 31

  14. I have Selenium Web Driver(v.2.47.0) and Selenium Web support (v.2.47.0) installed as references for my project and MicrosoftWebDriver.exe installed on my local machine. When I use the command – RemoteWebElement element = (RemoteWebElement)driver.FindElementById(“sb_form_q”); , I get a compilation error saying ‘OpenQA.Selenium.IWebDriver; does not contain a definition for ‘FindElementById’,

    If I use the following command – WebDriver.FindElement(By.Id(“sb-form-q”)); it says that object reference not found.

    Are any references missing or are these not implemented ?

  15. I see the .manage().getCookies() and deleteCookies() is not working, while deleteCookies() does not throw any exception but does not delete the cookies, getCookies() call is throwing error

    13:15:15.442 INFO – Executing: [get current window handle])
    13:15:15.463 INFO – Done: [get current window handle]
    13:15:15.536 INFO – Executing: [get all cookies])
    13:15:15.758 WARN – Exception thrown
    at org.openqa.selenium.remote.RemoteWebDriver$RemoteWebDriverOptions.getCookies(RemoteWebDriver.java:699)
    at org.openqa.selenium.support.events.EventFiringWebDriver$EventFiringOptions.getCookies(EventFiringWebDriver.java:524)
    at org.openqa.selenium.remote.server.handler.GetAllCookies.call(GetAllCookies.java:34)
    at org.openqa.selenium.remote.server.handler.GetAllCookies.call(GetAllCookies.java:1)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at org.openqa.selenium.remote.server.DefaultSession$1.run(DefaultSession.java:176)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    13:15:15.762 WARN – Exception: null
    13:15:15.949 INFO – Executing: [delete session: 1580be57-1fe0-47f4-8b0f-ebaf947b6d72])
    Listening on http://localhost:27918/
    Stopping server.

  16. When using sendKeys some characters are omitted. Example:

    WebDriver driver = new EdgeDriver();
    WebElement searchBar = driver.findElement(By.name(“q”));
    searchBar.sendKeys(“ascii value of @”);

    In the example above the “at” character is not sent to the google search bar.

    Using selenium java 2.48.2

    • I can reproduce the problem with @ character. Sendkeys funcion is not displayed @ character in simple input box.

      This is my configuration:

      Target Machine (Hub node where tests are run): Win 10 build 10585.104, MS Edge 25.10586.0.0 and MS EdgeHTML 13.10586

      Selenium framework: SeleniumHQ (for Java): 2.48.0

      I am using Selenium Grid to run my suite. In this case, I was only doing conceptual test of Egde implementing a basic test:
      1. Start Hub in local machine (Win 7) opening console (administrator privileges)
      2. Register Node in Hub in target remote machine (Win 10 build 10585) opening console (in this case without administrator privileges because in other way edge hangs when create new session).

      Setting up my grid and checking that everything is ok when I try to write my account name in login page I can not see the @ and my basic test fails (wrong credentials).

      I have introduced @ by hand in the moment edge is opened (interrupt point) and I can see symbol. I have sent “@@@@@@@@@@@@@@@” to the text field and I can not see any. In summary, I have tried many things and I can not see @

      When I started with Web Automation Testing using Selenium (Java) I remember this behaviour in old versions of Firefox and Chrome. I not really sure which one but it was reproducible in old version.

      This partial basic code (implementated with pageobject) IS WORKING with Firefox 35.0 and Chrome 48.0.2564.109 but NOT IS WORKING with Edge’s version I put at the beginning of my comment.

      WebElement element = WebDriverExtensions.findElement(context, By.cssSelector(“input[name=’username’][type=’email’]”));

      element.clear(); element.sendKeys(email);

      Front Developers are using AngularJS and are validating user’s text input to match with a welformatted email:

      I afraid that current Edge version does not support sendkeys with this kind of character, maybe the problem is front on-line validation and Edge has to suits these situations because they are really common.

      Best regards

  17. 9 month passed and no new Microsoft WebDriver versions were released.
    I still see WebDriver only for Windows 10 Build 10240 (7/24/2015)
    Is it really supported by Microsoft ? Looks like no.

  18. Version: Microsoft Edge 38.14393.0.0
    Microsoft Edge Driver Version: Version: 3.14393 | Edge version supported: 14.14393

    While trying to run selenium tests, I am facing issues with
    1. Link text
    2. text control inputs
    3. alertbox recognition
    4. setting control to frame content
    5. MultiSelect control, where only one of the items are selected
    6. Assertions, the data that is being rendered on Edge vis a vis chrome/firefox are different.
    7. File download, import in this case I am unable to set the DesiredCapabilities of the edge browser.

    • +1
      The text assertions are extremely important. The Microsoft Webdriver sees the content literally. The Chrome and Firefox webdrivers see what is viewed in the browser. It’s like MS Webdriver does not take sylesheets into account
      Text in HTML: “Go”
      Text visible on page: “GO”

      Chrome & FF webdriver Reads “GO”
      MS Webdriver reads “Go”

      • This is a known issue, we implemented our Element.Text via textContent, but the other drivers use a custom algorithm that doesn’t have a DOM equivalent. We plan to address this in the future by re-working how we obtain an Elements text.

    • I believe we fixed issues with the multi-select control in the Creators Update (15063).

      For the rest if you don’t mind could you file issues with your specific use case/repro (sample code is appreciated) so we can determine if they’re fixed or still bugs. You can file issues on Microsoft WebDriver here: issues.microsoftedge.com

  19. getCssValue() on Color will return rgb in Edge but rgba on the rest of the browsers this causes inconsistencies in our automation.


    returns rgba(78,121,167,1)


    returns rgb(78,121,167)

    Is there a plan to align this with the rest of the browsers?

    • On my last cmment the HTML was removed , but basically, the following line gets gets the alpha channel in every other browser except Edge.
      style=”background-color: rgb(78, 121, 167)

  20. Hi All,
    I want to handle the Basic Authentication from our proxy when I go to any url. But it seems to hang at get(url) method when the prompt is displayed. Any ideas how to handle the authentication.
    Thank you !!

  21. Thanks for your best job with EDGE webdriver.
    I experience the webdriver and i realize the webdriver does not work well on web element that is implemented by java script.
    some problem i have faced are
    . the webdriver does not recognize xpath if xpath is not start from theirs parent path
    . the webdriver does not click on element or it does not affect with command .click();
    . the webdriver always report element is not located or displayed or visible.
    can someone give me a suggest to work with Edge webdriver