Screenshot Commands

Microsoft Edge supports the following WebDriver commands for taking screenshots:

HTTP Request Commands
/session/{sessionId}/element/{id}/screenshot Take Element Screenshot
/session/{sessionId}/screenshot Take Screenshot

Take Element Screenshot

Name Take Element Screenshot
Description Takes a screenshot of the currently selected element.
Spec W3C WebDriver
HTTP Request GET /session/{sessionId}/element/{elementId}/screenshot

JSON Parameters None

JSON Response Value

{
    "sessionId": "{sessionId}",
    "status": 0,
    "value": "{image}"
}

Take Screenshot

Name Take Screenshot
Description Takes a screenshot of the current viewport.
Spec W3C WebDriver, JSON Wire Protocol
HTTP Request GET /session/{sessionId}/screenshot

JSON Parameters None.

JSON Response Value

{
    "sessionId": "{sessionId}",
    "status": 0,
    "value": "{base64EncodedString}"
}