Selenium Webdriver Edge

Active2 months ago

Method 1: webdriver.edge.driver system property When you use this method, you will need to just need to add a line of code to your test script to use MicrosoftWebDriver. You will need to add System.setProperty code in your script. I am using Selenium grid to run UI tests. Recently we decided to add MS Edge to our grid. And unfortunately I noticed that tests are running successfully only if there is RDP connection to Windows 10 established, where I have selenium node with Edge installed. Today we’re announcing support for automated testing of Microsoft Edge through the W3C WebDriver standard. To use WebDriver with Microsoft Edge, you need the MicrosoftWebDriver server on a Windows Insiders build of 10240 or newer. WebDriver is an emerging standard through which Web developers can. In the previous article, we have seen launching Firefox browser with Gecko driver using Selenium 3. Now let us try to launch Microsoft Edge browse using Selenium 3. Before proceeding, to start using Webdriver with Microsoft Edge browser, make sure you have Windows 10 on your machine and download the specified Microsoft WebDriver server version for your build.

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.)

SeleniumPaul van Leeuwen
1,4451 gold badge11 silver badges24 bronze badges
jzapatajzapata
6241 gold badge8 silver badges16 bronze badges

7 Answers

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.

EJoshuaS
7,94410 gold badges32 silver badges52 bronze badges
JimEvansJimEvans

Selenium Webdriver Tutorialspoint

23k5 gold badges69 silver badges94 bronze badges

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 -

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

Anish PillaiAnish Pillai

'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 :)

Anton AngelovAnton Angelov

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

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

Boni GarcíaBoni García
3,2463 gold badges17 silver badges37 bronze badges

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'

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

IainnIainn

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:RiponMicrosoftWebDriver.exe');
    driver = new EdgeDriver();

Ripon Al WasimRipon Al Wasim
27.6k31 gold badges131 silver badges153 bronze badges

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

Hope this can help someone.

YcherguiYchergui

Not the answer you're looking for? Browse other questions tagged seleniumselenium-webdriverwebdrivermicrosoft-edgeselenium-edgedriver or ask your own question.

-->

The W3C WebDriver API is a platform and language-neutral interface and wire protocol allowing programs or scripts to control the behavior of a web browser.

WebDriver enables developers to create automated tests that simulate user interaction. This is different from JavaScript unit tests because WebDriver has access to functionality and information that JavaScript running in the browser doesn't, and it can more accurately simulate user events or OS-level events. WebDriver can also manage testing across multiple windows, tabs and webpages in a single test session.

Here's how to get started with WebDriver for Microsoft Edge.

The Microsoft Edge implementation of WebDriver supports both the W3C WebDriver specification and the JSON Wire Protocol for backwards compatibility with existing tests.

Getting started with WebDriver for Microsoft Edge

  • Install Windows 10.
  • Download the appropriate Microsoft WebDriver server for your build of Windows.
  • Download the WebDriver language binding of your choice. All Selenium language bindings support Microsoft Edge.

Note

You can find help, report issues, and file feature requests at Microsoft Edge Feedback & Support.

Using WebDriver

To get started using WebDriver with Microsoft Edge, check out these samples:

  • C# code sample for opening a browser window, navigating to bing.com and searching for 'webdriver' (GitHub Gist).

WebDriver server command line flags

List of command line flags for the WebDriver server.

NameDescriptionAvailable Release
hostHost IP to use for the WebDriver server (default: localhost)14393
portPort to use for the WebDriver server (default: 17556)14393
packageApplicationUserModelId (AUMID) for the application to be launched by the WebDriver server14393
verboseOutputs requests received and responses sent by the WebDriver server14393
silentOutputs nothing15063
versionOutputs the version of MicrosoftWebDriver.exe17763
w3cUse W3C WebDriver protocol (default option)17763
jwpUse JSON Wire protocol17763
cleanupCleanup temporary data and registry keys set by the WebDriver server for --package. Other parameters are ignored17763

W3C WebDriver

The support on a per command basis for the W3C WebDriver Specification.

Capabilities

CapabilityKeyStatusAvailable Release
Browser Name'browserName'Supported17763
Browser Version'browserVersion'Supported17763
Platform Name'platformName'Supported17763
Accept Insecure TLS Certificates'acceptInsecureCerts'Not SupportedN/A
Page Load Strategy'pageLoadStrategy'Supported17763
Proxy Configuration'proxy'Not SupportedN/A
Window Dimensioning/Positioning'setWindowRect'Supported17763
Session Timeouts Configuration'timeouts'Supported17763
Unhandled Prompt Behavior'unhandledPromptBehavior'Partially Supported17763
InPrivate'ms:inPrivate'Supported17763
Extension Paths'ms:extensionPaths'Supported17763
Start Page'ms:startPage'Supported17763

Locator Strategies

Locator StrategyStatusAvailable Release
CSS SelectorsSupported17763
Link TextSupported17763
Partial Link TextSupported17763
Tag NameSupported17763
XPathSupported17763

Commands

HTTP MethodURI TemplateCommandStatusAvailable Release
POST/sessionNew SessionSupported17763
DELETE/session/{session id}Delete SessionSupported17763
GET/statusStatusSupported17763
GET/session/{session id}/timeoutsGet TimeoutsSupported17763
POST/session/{session id}/timeoutsSet TimeoutsSupported17763
POST/session/{session id}/urlNavigate ToSupported17763
GET/session/{session id}/urlGet Current URLSupported17763
POST/session/{session id}/backBackSupported17763
POST/session/{session id}/forwardForwardSupported17763
POST/session/{session id}/refreshRefreshSupported17763
GET/session/{session id}/titleGet TitleSupported17763
GET/session/{session id}/windowGet Window HandleSupported17763
DELETE/session/{session id}/windowClose WindowSupported17763
POST/session/{session id}/windowSwitch to WindowSupported17763
GET/session/{session id}/window/handlesGet Window HandlesSupported17763
POST/session/{session id}/frameSwitch To FrameSupported17763
POST/session/{session id}/frame/parentSwitch to Parent FrameSupported17763
GET/session/{session id}/window/rectGet Window RectSupported17763
POST/session/{session id}/window/rectSet Window RectSupported17763
POST/session/{session id}/window/maximizeMaximize WindowSupported17763
POST/session/{session id}/window/minimizeMinimize WindowSupported17763
POST/session/{session id}/window/fullscreenFullscreen WindowNot SupportedN/A
GET/session/{session id}/element/activeGet Active ElementSupported17763
POST/session/{session id}/elementFind ElementSupported17763
POST/session/{session id}/elementsFind ElementsSupported17763
POST/session/{session id}/element/{element id}/elementFind Element From ElementSupported17763
POST/session/{session id}/element/{element id}/elementsFind Elements From ElementSupported17763
GET/session/{session id}/element/{element id}/selectedIs Element SelectedSupported17763
GET/session/{session id}/element/{element id}/attribute/{name}Get Element AttributeSupported17763
GET/session/{session id}/element/{element id}/property/{name}Get Element PropertySupported17763
GET/session/{session id}/element/{element id}/css/{property name}Get Element CSS ValueSupported17763
GET/session/{session id}/element/{element id}/textGet Element TextSupported17763
GET/session/{session id}/element/{element id}/nameGet Element Tag NameSupported17763
GET/session/{session id}/element/{element id}/rectGet Element RectSupported17763
GET/session/{session id}/element/{element id}/enabledIs Element EnabledSupported17763
POST/session/{session id}/element/{element id}/clickElement ClickSupported17763
POST/session/{session id}/element/{element id}/clearElement ClearSupported17763
POST/session/{session id}/element/{element id}/sendKeysElement Send KeysSupported17763
GET/session/{session id}/sourceGet Page SourceSupported17763
POST/session/{session id}/execute/syncExecute ScriptSupported17763
POST/session/{session id}/execute/asyncExecute Async ScriptSupported17763
GET/session/{session id}/cookieGet All CookiesSupported17763
GET/session/{session id}/cookie/{name}Get Named CookieSupported17763
POST/session/{session id}/cookieAdd CookieSupported17763
DELETE/session/{session id}/cookie/{name}Delete CookieSupported17763
DELETE/session/{session id}/cookieDelete All CookiesSupported17763
POST/session/{session id}/actionsPerform ActionsSupported17763
DELETE/session/{session id}/actionsRelease ActionsSupported17763
POST/session/{session id}/alert/dismissDismiss AlertSupported17763
POST/session/{session id}/alert/acceptAccept AlertSupported17763
GET/session/{session id}/alert/textGet Alert TextSupported17763
POST/session/{session id}/alert/textSend Alert TextSupported17763
GET/session/{session id}/screenshotTake ScreenshotSupported17763
GET/session/{session id}/screenshot/{element id}Take Element ScreenshotSupported17763

Selenium Webdriver Edge Support

JSON Wire Protocol

The support on a per command basis for the JSON Wire Protocol.

Commands

Selenium Webdriver Example

HTTP MethodPathStatusAvailable Release
GET/statusSupported10240
POST/sessionSupported10240
GET/sessionsSupported10240
GET/session/:sessionIdSupported10240
DELETE/session/:sessionIdSupported10240
POST/session/:sessionId/timeoutsSupported10240
POST/session/:sessionId/timeouts/async_scriptNot SupportedN/A
POST/session/:sessionId/timeouts/implicit_waitSupported10586
GET/session/:sessionId/window_handleSupported10586
GET/session/:sessionId/window_handlesSupported10586
GET/session/:sessionId/urlSupported10240
POST/session/:sessionId/urlSupported10240
POST/session/:sessionId/forwardSupported10240
POST/session/:sessionId/backSupported10240
POST/session/:sessionId/refreshSupported10240
POST/session/:sessionId/executeSupported10240
POST/session/:sessionId/execute_asyncSupported10586
GET/session/:sessionId/screenshotSupported10240
GET/session/:sessionId/ime/available_enginesNot SupportedN/A
GET/session/:sessionId/ime/active_engineNot SupportedN/A
GET/session/:sessionId/ime/activatedNot SupportedN/A
POST/session/:sessionId/ime/deactivateNot SupportedN/A
POST/session/:sessionId/ime/activateNot SupportedN/A
POST/session/:sessionId/frameSupported10586
POST/session/:sessionId/frame/parentSupported10586
POST/session/:sessionId/windowSupported10586
DELETE/session/:sessionId/windowSupported10586
POST/session/:sessionId/window/:windowHandle/sizeSupported10586
GET/session/:sessionId/window/:windowHandle/sizeSupported10586
POST/session/:sessionId/window/:windowHandle/positionSupported10586
GET/session/:sessionId/window/:windowHandle/positionSupported10586
GET/session/:sessionId/window/:windowHandle/maximizeSupported10586
GET/session/:sessionId/cookieSupported10586
POST/session/:sessionId/cookieSupported10240
DELETE/session/:sessionId/cookieSupported10586
DELETE/session/:sessionId/cookie/:nameSupported10240
GET/session/:sessionId/sourceSupported10586
GET/session/:sessionId}/titleSupported10240
POST/session/:sessionId/elementSupported10586
POST/session/:sessionId/elementsSupported10586
POST/session/:sessionId/element/activeSupported10586
GET/session/:sessionId/element/:idNot SupportedN/A
POST/session/:sessionId/element/:id/elementSupported10586
POST/session/:sessionId/element/:id/elementsSupported10586
POST/session/:sessionId/element/:id/clickSupported10240
POST/session/:sessionId/element/:id/submitSupported10586
GET/session/:sessionId/element/:id/textSupported10240
POST/session/:sessionId/element/:id/valueSupported10240
POST/session/:sessionId/keysSupported10586
GET/session/:sessionId/element/:id/nameSupported10240
POST/session/:sessionId/element/:id/clearSupported10240
GET/session/:sessionId/element/:id/selectedSupported10240
GET/session/:sessionId/element/:id/enabledSupported10240
GET/session/:sessionId/element/:id/attribute/:nameSupported10240
GET/session/:sessionId/element/:id/equals/:otherSupported10586
GET/session/:sessionId/element/:id/displayedSupported10240
GET/session/:sessionId/element/:id/locationSupported10586
GET/session/:sessionId/element/:id/location_in_viewSupported10586
GET/session/:sessionId/element/:id/sizeSupported10586
GET/session/:sessionId/element/:id/css/:propertyNameSupported10240
GET/session/:sessionId/orientationNot SupportedN/A
POST/session/:sessionId/orientationNot SupportedN/A
GET/session/:sessionId/alert_textSupported10240
POST/session/:sessionId/alert_textSupported10586
POST/session/:sessionId/accept_alertSupported10240
POST/session/:sessionId/dismiss_alertSupported10240
POST/session/:sessionId/movetoSupported10586
POST/session/:sessionId/clickSupported10240
POST/session/:sessionId/buttondownSupported10586
POST/session/:sessionId/buttonupSupported10586
POST/session/:sessionId/doubleclickSupported10586
POST/session/:sessionId/touch/clickNot SupportedN/A
POST/session/:sessionId/touch/downNot SupportedN/A
POST/session/:sessionId/touch/upNot SupportedN/A
POST/session/:sessionId/touch/moveNot SupportedN/A
POST/session/:sessionId/touch/scrollNot SupportedN/A
POST/session/:sessionId/touch/scrollNot SupportedN/A
POST/session/:sessionId/touch/doubleclickNot SupportedN/A
POST/session/:sessionId/touch/longclickNot SupportedN/A
POST/session/:sessionId/touch/flickNot SupportedN/A
POST/session/:sessionId/touch/flickNot SupportedN/A
GET/session/:sessionId/locationSupported10586
POST/session/:sessionId/locationSupported10586
GET/session/:sessionId/local_storageSupported10586
POST/session/:sessionId/local_storageSupported10586
DELETE/session/:sessionId/local_storageSupported10586
GET/session/:sessionId/local_storage/key/:keySupported10586
DELETE/session/:sessionId/local_storage/key/:keySupported10586
GET/session/:sessionId/local_storage/sizeSupported10586
GET/session/:sessionId/session_storageSupported10586
POST/session/:sessionId/session_storageSupported10586
DELETE/session/:sessionId/session_storageSupported10586
GET/session/:sessionId/session_storage/key/:keySupported10586
DELETE/session/:sessionId/session_storage/key/:keySupported10586
GET/session/:sessionId/session_storage/sizeSupported10586
GET/session/:sessionId/logNot SupportedN/A
GET/session/:sessionId/log/typesNot SupportedN/A
GET/session/:sessionId/application_cache/statusSupported10586