Thursday, July 23, 2015

Using the Microsoft Driver for Microsoft Edge




As the release of Windows 10 has approached, I've been seeing more and more questions about a WebDriver implementation for Microsoft Edge (nee "Spartan"). So far, I've only been able to say that there isn't a driver implementation for that particular browser, and that there is no work being done in the open-source arena on such an implementation. Furthermore, that Microsoft has acknowledged the need for such a driver and has committed to providing one, but has provided no timetable for a release of such an implementation.

As of today, I can say much more than that.

Today, Microsoft has announced the availability of a WebDriver implementation for Microsoft Edge. This implementation is released as an installable application for Windows 10, and you can download the installation package here. While the requirement to run an installer might be off-putting to some users, it appears that the installation package merely installs a standalone executable to the restricted "Program Files" location. As near as I can tell by examining the installer package, the executable can be freely copied to other locations on the machine after installation. Also, the use of an installable package means the executable can be serviced and updated by the standard, automatic Microsoft Update mechanism.

The last point is incredibly important. This first release of a driver from Microsoft is most emphatically not a finished release, and as such it lacks functionality, some of it rather basic. To wit, finding an element within the context of another element (i.e., WebElement.findElement) is not yet implemented in the current release. Finding an element via XPath is not implemented in this first release either. Switching to frames or iframes (i.e., driver.switchTo().frame()) is likewise not implemented in this initial release, and neither is the advanced user interactions API (i.e,. the Actions class). In fairness, Microsoft has been completely forthcoming in what functionality the driver has implemented and what is missing. I fully expect that the driver will be receiving regular updates, and that the missing functionality will be added in the coming weeks and months.

So, how does one use the Microsoft Edge driver? Well, thanks to our good friends in Redmond, the release of the driver implementation was accompanied by a pull request to the Selenium project that enables the existing language bindings to use it seamlessly. The Edge driver as currently released uses the open-source project's dialect of the WebDriver JSON wire protocol, allowing us to use the driver right now. My guess would be that a future release of the driver will use the W3C specification version of the protocol. The pull request has been merged, so all you'll need is an updated language binding release, and you'll be able to use it directly. If you're itching to use it in the meantime, you can manually launch MicrosoftWebDriver.exe, and use the RemoteWebDriver class in your current language bindings to connect to it on your local Windows 10 machine.

Congratulations to the Microsoft Edge development team for releasing a standard tool for automating Microsoft Edge. I, for one, appreciate the hard work and efforts you've put forth to make this happen. I look forward to future enhancements and features, and I stand ready to help any way I possibly can.

8 comments:

  1. This comment has been removed by a blog administrator.

    ReplyDelete
  2. Now we are going into 2016 and there is still no working Edge driver available. The driver released on july 2015 stops working when you do an Windows 10 update and Edge becomes updated. With the new Edge version the old webdriver does not even connect to the browser!

    ReplyDelete
  3. This comment has been removed by a blog administrator.

    ReplyDelete
  4. This comment has been removed by a blog administrator.

    ReplyDelete
  5. This comment has been removed by a blog administrator.

    ReplyDelete
  6. Hey Jim, will please answer this question: http://stackoverflow.com/q/40521731/2119169

    ReplyDelete
  7. Hey,Thanks for precious post.
    If you need technical expert help to sort out Microsoft edge tech issues, then you just call us on out toll free number 1-800-294-5907. Our team is always here to help you and give what is required in stipulated time by diagnosing the problem at its root and then showcase the solutions through
    support for Microsoft edge
    .

    ReplyDelete