ms.assetid | description | title | author | ms.author | ms.date | ms.topic | ms.prod | keywords |
---|---|---|---|---|---|---|---|---|
15595d4b-1da5-4ec4-93a4-aff5dc7e400f |
Learn useful information about the commands that interact with alert dialogs for the WebDriver API. |
Webdriver commands - Dialogs |
erikadoyle |
edoyle |
02/08/2017 |
article |
microsoft-edge |
edge, web development, html, css, javascript, developer |
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 |
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
}
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}"
}
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
}