Test Automation on Microsoft Edge Browser using Selenium Web Driver

MICROSOFT EDGE 

Microsoft Edge, initially developed under the codename Project Spartan, is a web browser developed by Microsoft and included in the Microsoft Windows operating system. Officially released on July 29, 2015, for Windows 10. It replaced Internet Explorer, which was used as the default browser since Windows ‘95 release, as the default browser on Windows 10. It will also be the default browser of the forthcoming release of Windows 10 for smartphones and small tablets.

Microsoft Edge is designed to be a lightweight web browser with a layout engine built around web standards, removing support for legacy technologies such as ActiveX in favour of extensions and integration with other Microsoft services, such as the digital assistant Cortana and OneDrive; it also includes annotation tools and a reading mode.

WEBDRIVER SUPPORT FOR EDGE

Microsoft has announced support for automated testing of Microsoft Edge through the W3C WebDriver standard. To use WebDriver with Microsoft Edge, we need the Microsoft WebDriver server on  Windows 10. 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.

With this new capability, Microsoft Edge can be run through the same regression testing as other browsers, helping developers and testers to identify issues with less effort and making sites just work for the end users.

learn more about Microsoft test automation

You can refer to the GitHub library for the desired capabilities in selenium for edge browsers for all the detailed methods and etc.

HOW WEBDRIVER WORKS

1. WebDriver Server :

To get started using WebDriver, we need to have the first Microsoft WebDriver Server installed in our Windows 10 operating system to start with a new automation framework or to use the existing one. To download the Microsoft edge driver, click here.

WebDriver is disabled by default for security. In order to enable using WebDriver, you will need to download edge driver and install the Microsoft WebDriver 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.

Use WebDriver to automate Microsoft Edge

This server forms a link between Selenium and Edge Browser as shown in the following diagram:

link between Selenium and Edge Browser
link between Selenium and Edge Browser

2. Supporting Language :

After installation of the Microsoft Driver Server, we will have to choose the framework development language. Currently, the updates of web driver support have been submitted to C# and Java Selenium language bindings.

Selenium provides support for all the basic APIs of the Edge browser version 2.47.1 onward. Microsoft Web Driver for IE Edge supports xpath too.

To know more about how to do C# Selenium testing with MS Edge driver

 

3. Automation Framework :

I. Framework from scratch:

If you are building the framework from scratch to be tested on Microsoft Edge then firstly download the language-specific selenium client. And import it within the project. Here we will use java as a framework development language.

Step 1 -> Set System property for edge driver.

Set System property for edge driver
Set System property for edge driver

Step 2 ->If you want to change the default page load strategy of edge browser which is normal by default you can use the following code snippet 

Set System property
Set System property

Step 3 ->Get the object of Edge browser as follows

Using this driver instance you can access the different objects with the help of different locators on the website you want to automate. Except few, most of the locators will work for the Edge browser. These options will be discussed in the next section in detail.

II. Existing Framework to run on Microsoft Edge:

The latest release Selenium 2.53.1 provides good support for most of the features that we have available for the other browsers to date. So you will not be able to run the existing framework on the edge browser directly. We have checked with the latest release of Selenium and found that the following list of features is supported.

As per the latest release Selenium 2.53.1

Locators supported: id, css, cssSelector, name, tagName, xpath, linkText, partialLinkText, tagName

Functionality supported: Maximize screen, full-screen window, getting window handles, size, and handling alerts is also supported with the latest versions of IE Web driver.

We at AFourTech have implemented an e web test automation framework that will act as an accelerator to help you code, execute and generate a report of your manual test cases, all within a couple of hours. It provides the added advantage of supporting all major browsers like Chrome, Firefox, IE, and IE Edge as well as allowing you to code in multiple languages supported by Selenium i.e. Java, C#, Python, Ruby, PHP, and Javascript.

13 Comments

  • Purushotham

    Hi After launching the edge browser i am not able to perform get, browser is launched but not able to open the required website using get.

    driver.get(“http://google.com)

    Can you please suggest.

    Thanks,

    • Abhijiit Patange

      Hi Purushottam..
      You can try this for your problem.

      System.setProperty(“webdriver.edge.driver”, “C:\Program Files (x86)\Microsoft Web Driver\MicrosoftWebDriver.exe”);
      EdgeOptions options = new EdgeOptions();
      options.setPageLoadStrategy(“eager”);
      driver = new EdgeDriver(options);
      driver.get(“https://www.google.co.in”);

      Regards,
      Abhijiit

  • Shah

    hi,i did exactly what you wrote in comment but didn’t work for me.

  • It’s hard to find knowledgeable people in this particular topic, however, you seem like you know what you’re talking about! Thanks|

  • Tyson Canino  

    Good tidings, Generally I never remark on online journals yet your article is persuading to the point that I never stop myself to say something regarding it. You’re working effectively, Keep it up. You can look at this article, may be of help 🙂

  • Apryl Krug  

    Good tidings, Generally I never remark on online journals yet your article is persuading to the point that I never stop myself to say something regarding it. You’re working effectively, Keep it up. You can look at this article, may be of help 🙂

  • Sharice Maietta

    I was able to find good info from your articles.

  • Kermit Favilla

    After going over a number of the articles on your site, I truly appreciate your technique of writing a blog. I saved it to my bookmark webpage list and will be checking back soon. Please visit my website as well and tell me how you feel.

  • Loren Talboti

    This is very interesting, You’re a very skilled blogger. I’ve joined your rss feed and look forward to seeking more of your wonderful post. Also, I have shared your web site in my social networks!

  • Nathanial Manzanares

    Thanks for sharing superb informations. Your web-site is so cool. I’m impressed by the details that you have on this site. It reveals how nicely you understand this subject. Bookmarked this website page, will come back for more articles. You, my friend, ROCK! I found simply the info I already searched everywhere and simply couldn’t come across. What a perfect site.

  • Pauline Spidel

    I must get across my appreciation for your kind-heartedness giving support to those people who actually need help on the area. Your special commitment to getting the message across became pretty important and has all the time enabled professionals like me to reach their desired goals. This insightful facts means a whole lot a person like me and even more to my mates. Thank you; from everyone of us.

  • Enid Belstad

    Thanks so much for providing individuals with a very nice opportunity to discover important secrets from this web site. It can be very superb and also full of amusement for me and my office friends to visit your site at a minimum three times in 7 days to see the newest guidance you will have. And definitely, I’m usually fulfilled with the gorgeous techniques you serve. Some 1 points in this article are really the most suitable we’ve had.

  • Rigoberto Graen

    Good post. I am facing many of these issues as well..

Leave a Reply