ie_dialog
Accept, dismiss, or answer JavaScript alert, confirm, and prompt dialogs in Edge IE mode, including prompt text entry, and refuse system dialogs that need user action.
Instructions
Handle a script dialog (alert/confirm/prompt). action: accept (default) | dismiss | text | sendkeys (with text, for a prompt; it also accepts). Without target it uses the driver's alert, then a script alert or confirm window of the session. With target="hwnd:" (a script_dialog from ie_windows or a NOTICE) it needs no driver: it presses that window's button (alert: OK; confirm: accept = OK/true, dismiss = Cancel/false) after checking that it really is the session's own alert or confirm; a confirm's message is not readable through its window, so action=text then asks the driver alert when it can. A dialog shown as a TaskDialog (IE's "leave this page?" prompt has that shape) is accepted, with or without target, only when the page's instrumentation recorded it (a pending dialog-open record, see ie_console); otherwise accept is refused: ask the user. Answers carry that record as evidence. A prompt is answered only through the driver alert, so a prompt raised inside a showModalDialog window cannot be answered (ask the user). System dialogs (file, print, security prompts) are never answered: 'system dialog: ask the user'.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "ie_dialog"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | No | text for sendkeys | |
| action | No | accept | dismiss | text | sendkeys | |
| target | No | hwnd:<n>: the script dialog window to answer through the window path (no driver needed) |