January 11, 2020

Execute scripts on Edge Browser

In this post we will see how to execute webdriver scripts in EDGE Browser.

For other browsers like google chrome and firefox we need to download corresponding exe files and need to set system path.

If you are using latest version of edge i.e 18+ then the set up is little bit different.

Check Edge Version : 
Launch edge browser
Right hand top corner you see 3 dots.
Click on 3 dots and click on Settings
At the end you can see browser information. Mine is Microsift Edge HTML 18.1863

Download exe file:
Edge browser exe files are available in below path
https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/#downloads

If your edge version is less than 18 then straight away download corresponding exe file and in your webdriver script need to set the system property like below.


If your edge version is 18 then need to perform belwo steps.

Below command should be executed in an elevated command prompt.

DISM.exe /Online /Add-Capability /CapabilityName:Microsoft.WebDriver~~~~0.0.1.0

Elevated command prompt is nothing but need to launch your command prompt as admin.

Once you execute the command it will download MicrosoftWebDriver.exe file under C:\Windows\System32 folder.

Thats it...you can execute your scripts in Edge browser. no need to set up any path.

Below is the sample code:






Video is available here:


2 comments: