Is there a Selenium WebDriver available for the Microsoft Edge browser?
Asked Answered
T

7

55

As of the date of this post the name "Microsoft Edge" has just been officially announced as the default browser for the new Windows 10.

It may be premature to ask but I would like to know if a new Selenium WebDriver is available for it and if not, if there is any telling how long we might expect to wait until we see one developed?

(A technical preview of Windows 10 has already been out so this doesn't seem like a foolish question to me.)

Truckload answered 5/5, 2015 at 5:28 Comment(4)
did you try to run with edge browser?Outsell
I don't think that there are any such announcements for the new browser.Subterfuge
docs.seleniumhq.org/about/platforms.jspBate
I installed the Insider Preview of Windows 10 and it has both IE and Edge (aka "Spartan Project") installed. The selenium webdriver (IE) of course opens IE. Good new is that it seems to work so far. Edge is a completely different browser meaning that a new WebDriver would have to be designed to support it. I guess I am setup to test something whenever it comes out...Truckload
S
54

Yes, there is a WebDriver implementation for Microsoft Edge. Its initial availability was announced on 23 July 2015. Language bindings in the Selenium open source project have been updated to take advantage of this driver implementation, and those updates have been released in Selenium 2.47. Note that the Java language bindings were re-released as 2.47.1 to correct an initial issue. The initial implementation has limited functionality, but Microsoft is committed to bringing a fully functional driver implementation to fruition, so updates will be forthcoming.

Subchaser answered 5/5, 2015 at 14:7 Comment(4)
Thank you very much for your response. This is exactly the type of information I was hoping for. Do you happen to have any references for this info?Truckload
Consider updating your comment. The link you made with "limited functionality" is no longer valid. Everything on that list is now marked as "complete".Verbality
The link shows a status page of everything that has been implemented, but neglects to mention anything at all that hasn't. For example, switching to frames, with an end point of /session/:sessionid/frame is not listed on the status page, and indeed, is not implemented in the driver.Subchaser
As of Nov 2015 the web driver functionality is not complete although getting closer. See Unknown Command issues.Truckload
T
13

Microsoft has provided MicrosoftWebDriver which can be used for Edge browser.

  1. Correct version of MicrosoftWebDriver needs to be downloaded, based on the OS Build number

  2. Go to Start > Settings > System > About and note down the OS Build number.

  3. Download the proper version of the driver from this link - https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/

  4. If the file that's downloaded is .msi, then install it to get the .exe driver. For one of the release, direct .exe can be downloaded.

  5. Once the MicrosoftWebDriver.exe is downloaded, we can use it in our test script using either System.setProperty("webdriver.edge.driver", "driver location") or using environment variable

The sample script would be like this -

System.setProperty("webdriver.edge.driver","C:\\Program Files (x86)\\Microsoft Web Driver\\MicrosoftWebDriver.exe"); //put actual location
WebDriver driver = new EdgeDriver();
driver.get("your link");

Refer this article for detailed information - http://automationtestinghub.com/selenium-3-launch-microsoft-edge-with-microsoftwebdriver/

Trot answered 24/8, 2016 at 14:47 Comment(2)
is there an option for macs?Freezing
I visited developer.microsoft.com/en-us/microsoft-edge/tools/webdriver to download. But unfortunately I did not find "MicrosoftWebDriver.exe" for my Windows 10, Build 17763 . I found for the Build 17134. Where can I get for the Build 17763?Norword
S
5

The Microsoft Edge driver for Selenium can be automatically downloaded (for Java) using the library webdrivermanager as follows:

EdgeDriverManager.getInstance().setup();

The variable webdriver.edge.driver is also exported by webdrivermanager with the proper path of MicrosoftWebDriver.exe.

Schoolmistress answered 1/11, 2015 at 10:10 Comment(2)
^( for java ) ...creates a wrong impression. Microsoft webdriver of edge works with any * supported * programming api of seleniumBautista
As of Jan2020, new syntax is WebDriverManager.edgedriver().setup(); +1 for mentioning webdrivermanagerPronouncement
S
4

"in case it wasn't clear, Microsoft Edge will have WebDriver support. It isn't available today, but is in development Q's? #msedgesummit" tweet from John Jansen the who is - "Microsoft Engineer. Principal Software Engineer (nee Test) Lead on Project Spartan (nee Internet Explorer)." You can find him on twitter @thejohnjansen and wait for an announcement :)

Spleeny answered 8/5, 2015 at 18:15 Comment(0)
N
1

Prerequisite: Windows 10 is installed on your machine

  1. Download the specified Microsoft WebDriver server version for your build (In my case it is MicrosoftWebDriver.exe for the Operating System: Windows 10 Pro 64-bit (10.0, Build 14393))
  2. Selenium WD Java code for MS Edge is as follows:

    System.setProperty("webdriver.edge.driver", "D:\Ripon\MicrosoftWebDriver.exe");
    driver = new EdgeDriver();

Norword answered 13/11, 2017 at 9:43 Comment(0)
S
1

As of EdgeHTML version 18 (which arrived with Windows version 1809), there is no longer a standalone driver download. You can obtain the new driver in one of two ways:

  • Start - type "Manage optional features" - Click "Add a Feature" - Find "WebDriver"
  • Entering the following on an elevated command prompt - "DISM.exe /Online /Add-Capability /CapabilityName:Microsoft.WebDriver~~~~0.0.1.0"

https://blogs.windows.com/msedgedev/2018/06/14/webdriver-w3c-recommendation-feature-on-demand/#Qj75uxuFHccPmCW5.97

Legacy versions are still available from: https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/

Update: It appears that version 18 is now legacy and we are back to installing a separate webdriver since the move to Chromium. The link directly above this will still take you to the correct drivers page.

Staceystaci answered 18/6, 2019 at 9:56 Comment(2)
Where does the DISM put the executable? How can anyone run the following if you don't know where the webdriver executable is? System.setProperty("webdriver.edge.driver", "MysteriousDirectory\MicrosoftWebDriver.exe"); driver = new EdgeDriver();Eboat
@Eboat I don't have an exact answer for you, I start Edge using: var options = new EdgeOptions(); var service = EdgeDriverService.CreateDefaultService(); var theDriver = new EdgeDriver(service, options); so I don't specify the driver location.Staceystaci
C
0

Thanks for your help, I was blocked with my tests, searching for a "EdgeDriver.exe" asked by the selenium EdgeDriver implementation and only find the MicrosoftWebDriver.

I have made this in C# if this can help someone, based on your previous answers :

First, you need to download the MicrosoftWebDriver nuget package, this one will only make a copy of the MicrosoftWebDriver.exe into your destination folder on compilation then

private readonly string _localDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);

Environment.SetEnvironmentVariable("webdriver.edge.driver", _localDir + "MicrosoftWebDriver.exe");
var driver = new EdgeDriver();

Hope this can help someone.

Clemmieclemmons answered 19/3, 2019 at 16:7 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.