- August 26, 2015
- Posted by: AFourTech
- Category: Blogs
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.
HOW WEBDRIVER WORKS
1. WebDriver Server :
To get started using WebDriver, we need to have first Microsoft WebDriver Server installed in our Windows 10 operating system to start with new automation framework or to use the existing one. To download the Microsoft WebDriver Server , click here.
WebDriver is disabled by default for security. In order to enable using WebDriver, you will need to download 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.
This server forms a link between Selenium and Edge Browser as shown in following diagram:2. Supporting Language :
After installation of the Microsoft Driver Server we will have to choose the framework development language. Currently the updates of webdriver 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.
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 framework development language.
Step 1 -> Set System property for edge driver.
Step 2 ->If you want change the default page load strategy of edge browser which is normal by default you can use the following code snippet
Step 3 ->Get the object of Edge browser as follows
Using this driver instance you can access the different objects with 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 next section in details.
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 till 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 following list of features is supported.
As per 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, handling alerts is also supported with the latest versions of IE Web driver.