Alert Dialog Commands

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

HTTP Request Commands
/session/{sessionId}/accept_alert Accept Alert
/session/{sessionId}/alert_text Get Text
/session/{sessionId}/dismiss_alert Dismiss Alert

Accept Alert

Name Accept Alert
Description Accepts the currently displayed alert dialog.
Spec W3C WebDriver, JSON Wire Protocol
HTTP Request POST /session/{sessionId}/accept_alert

JSON Parameters None.

JSON Response Value

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

Get Text

Name Get Text
Description Returns the text of the currently displayed alert dialog.
Spec W3C WebDriver, JSON Wire Protocol
HTTP Request GET /session/{sessionId}/alert_text

JSON Parameters None.

JSON Response Value

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

Dismiss Alert

Name Dismiss Alert
Description Dismisses the currently displayed alert dialog.
Spec W3C WebDriver, JSON Wire Protocol
HTTP Request POST /session/{sessionId}/dismiss_alert

JSON Parameters None.

JSON Response Value

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