WebDriver (EdgeHTML)
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 (EdgeHTML).
The Microsoft Edge (EdgeHTML) 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 (EdgeHTML)
- Install Windows 10.
- Download the appropriate Microsoft WebDriver server for your build of Windows and Microsoft Edge (EdgeHTML).
- Download the WebDriver language binding of your choice. All Selenium language bindings support Microsoft Edge (EdgeHTML).
Note
You can find help, report issues, and file feature requests at Microsoft Edge (EdgeHTML) Feedback & Support.
Using WebDriver
To get started using WebDriver with Microsoft Edge (EdgeHTML), 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.
Name | Description | Available Release |
---|---|---|
host | Host IP to use for the WebDriver server (default: localhost) | 14393 |
port | Port to use for the WebDriver server (default: 17556) | 14393 |
package | ApplicationUserModelId (AUMID) for the application to be launched by the WebDriver server | 14393 |
verbose | Outputs requests received and responses sent by the WebDriver server | 14393 |
silent | Outputs nothing | 15063 |
version | Outputs the version of MicrosoftWebDriver.exe | 17763 |
w3c | Use W3C WebDriver protocol (default option) | 17763 |
jwp | Use JSON Wire protocol | 17763 |
cleanup | Cleanup temporary data and registry keys set by the WebDriver server for --package. Other parameters are ignored | 17763 |
W3C WebDriver
The support on a per command basis for the W3C WebDriver Specification.
Capabilities
Capability | Key | Status | Available Release |
---|---|---|---|
Browser Name | "browserName" | Supported | 17763 |
Browser Version | "browserVersion" | Supported | 17763 |
Platform Name | "platformName" | Supported | 17763 |
Accept Insecure TLS Certificates | "acceptInsecureCerts" | Not Supported | N/A |
Page Load Strategy | "pageLoadStrategy" | Supported | 17763 |
Proxy Configuration | "proxy" | Not Supported | N/A |
Window Dimensioning/Positioning | "setWindowRect" | Supported | 17763 |
Session Timeouts Configuration | "timeouts" | Supported | 17763 |
Unhandled Prompt Behavior | "unhandledPromptBehavior" | Partially Supported | 17763 |
InPrivate | "ms:inPrivate" | Supported | 17763 |
Extension Paths | "ms:extensionPaths" | Supported | 17763 |
Start Page | "ms:startPage" | Supported | 17763 |
Locator Strategies
Locator Strategy | Status | Available Release |
---|---|---|
CSS Selectors | Supported | 17763 |
Link Text | Supported | 17763 |
Partial Link Text | Supported | 17763 |
Tag Name | Supported | 17763 |
XPath | Supported | 17763 |
Commands
HTTP Method | URI Template | Command | Status | Available Release |
---|---|---|---|---|
POST | /session | New Session | Supported | 17763 |
DELETE | /session/{session id} | Delete Session | Supported | 17763 |
GET | /status | Status | Supported | 17763 |
GET | /session/{session id}/timeouts | Get Timeouts | Supported | 17763 |
POST | /session/{session id}/timeouts | Set Timeouts | Supported | 17763 |
POST | /session/{session id}/url | Navigate To | Supported | 17763 |
GET | /session/{session id}/url | Get Current URL | Supported | 17763 |
POST | /session/{session id}/back | Back | Supported | 17763 |
POST | /session/{session id}/forward | Forward | Supported | 17763 |
POST | /session/{session id}/refresh | Refresh | Supported | 17763 |
GET | /session/{session id}/title | Get Title | Supported | 17763 |
GET | /session/{session id}/window | Get Window Handle | Supported | 17763 |
DELETE | /session/{session id}/window | Close Window | Supported | 17763 |
POST | /session/{session id}/window | Switch to Window | Supported | 17763 |
GET | /session/{session id}/window/handles | Get Window Handles | Supported | 17763 |
POST | /session/{session id}/frame | Switch To Frame | Supported | 17763 |
POST | /session/{session id}/frame/parent | Switch to Parent Frame | Supported | 17763 |
GET | /session/{session id}/window/rect | Get Window Rect | Supported | 17763 |
POST | /session/{session id}/window/rect | Set Window Rect | Supported | 17763 |
POST | /session/{session id}/window/maximize | Maximize Window | Supported | 17763 |
POST | /session/{session id}/window/minimize | Minimize Window | Supported | 17763 |
POST | /session/{session id}/window/fullscreen | Fullscreen Window | Not Supported | N/A |
GET | /session/{session id}/element/active | Get Active Element | Supported | 17763 |
POST | /session/{session id}/element | Find Element | Supported | 17763 |
POST | /session/{session id}/elements | Find Elements | Supported | 17763 |
POST | /session/{session id}/element/{element id}/element | Find Element From Element | Supported | 17763 |
POST | /session/{session id}/element/{element id}/elements | Find Elements From Element | Supported | 17763 |
GET | /session/{session id}/element/{element id}/selected | Is Element Selected | Supported | 17763 |
GET | /session/{session id}/element/{element id}/attribute/{name} | Get Element Attribute | Supported | 17763 |
GET | /session/{session id}/element/{element id}/property/{name} | Get Element Property | Supported | 17763 |
GET | /session/{session id}/element/{element id}/css/{property name} | Get Element CSS Value | Supported | 17763 |
GET | /session/{session id}/element/{element id}/text | Get Element Text | Supported | 17763 |
GET | /session/{session id}/element/{element id}/name | Get Element Tag Name | Supported | 17763 |
GET | /session/{session id}/element/{element id}/rect | Get Element Rect | Supported | 17763 |
GET | /session/{session id}/element/{element id}/enabled | Is Element Enabled | Supported | 17763 |
POST | /session/{session id}/element/{element id}/click | Element Click | Supported | 17763 |
POST | /session/{session id}/element/{element id}/clear | Element Clear | Supported | 17763 |
POST | /session/{session id}/element/{element id}/sendKeys | Element Send Keys | Supported | 17763 |
GET | /session/{session id}/source | Get Page Source | Supported | 17763 |
POST | /session/{session id}/execute/sync | Execute Script | Supported | 17763 |
POST | /session/{session id}/execute/async | Execute Async Script | Supported | 17763 |
GET | /session/{session id}/cookie | Get All Cookies | Supported | 17763 |
GET | /session/{session id}/cookie/{name} | Get Named Cookie | Supported | 17763 |
POST | /session/{session id}/cookie | Add Cookie | Supported | 17763 |
DELETE | /session/{session id}/cookie/{name} | Delete Cookie | Supported | 17763 |
DELETE | /session/{session id}/cookie | Delete All Cookies | Supported | 17763 |
POST | /session/{session id}/actions | Perform Actions | Supported | 17763 |
DELETE | /session/{session id}/actions | Release Actions | Supported | 17763 |
POST | /session/{session id}/alert/dismiss | Dismiss Alert | Supported | 17763 |
POST | /session/{session id}/alert/accept | Accept Alert | Supported | 17763 |
GET | /session/{session id}/alert/text | Get Alert Text | Supported | 17763 |
POST | /session/{session id}/alert/text | Send Alert Text | Supported | 17763 |
GET | /session/{session id}/screenshot | Take Screenshot | Supported | 17763 |
GET | /session/{session id}/screenshot/{element id} | Take Element Screenshot | Supported | 17763 |
JSON Wire Protocol
The support on a per command basis for the JSON Wire Protocol.