Skip to content

Latest commit

 

History

History
79 lines (66 loc) · 2.4 KB

File metadata and controls

79 lines (66 loc) · 2.4 KB
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

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
}