handle_dialog
Set how the browser responds to the next alert, confirm, or prompt dialog before it appears. Choose accept, dismiss, or check pending dialog status.
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 |
|---|---|---|---|
| text | No | Text to enter in prompt dialogs (only used with action: accept) | |
| action | Yes | accept: accept the next dialog, dismiss: dismiss/cancel it, get_status: check pending dialogs |