Alert Dialog Commands

Microsoft Edge supports the following WebDriver commands for interacting with alert dialogs:

HTTP RequestCommands
/session/{sessionId}/accept_alertAccept Alert
/session/{sessionId}/alert_textGet Text
/session/{sessionId}/dismiss_alertDismiss Alert

Accept Alert

NameAccept Alert
DescriptionAccepts the currently displayed alert dialog.
SpecW3C WebDriver, JSON Wire Protocol
HTTP RequestPOST /session/{sessionId}/accept_alert

JSON Parameters
None.

JSON Response Value

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

Get Text

NameGet Text
DescriptionReturns the text of the currently displayed alert dialog.
SpecW3C WebDriver, JSON Wire Protocol
HTTP RequestGET /session/{sessionId}/alert_text

JSON Parameters
None.

JSON Response Value

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

Dismiss Alert

NameDismiss Alert
DescriptionDismisses the currently displayed alert dialog.
SpecW3C WebDriver, JSON Wire Protocol
HTTP RequestPOST /session/{sessionId}/dismiss_alert

JSON Parameters
None.

JSON Response Value

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