handle_dialog
Configure automatic handling of browser dialogs such as alerts, confirms, and prompts. Set accept or dismiss actions before triggering dialogs to prevent blocking script execution.
Instructions
Configure browser dialog handling (alerts, confirms, prompts). Pre-configure BEFORE triggering actions that may show dialogs. Replaces evaluate-based workarounds (window.alert = ...) — handle_dialog uses CDP Page.javascriptDialogOpening and works even when the dialog blocks all JS.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | accept: accept the next dialog, dismiss: dismiss/cancel it, get_status: check pending dialogs | |
| text | No | Text to enter in prompt dialogs (only used with action: accept) |