handle_dialog
Set automatic responses to browser alerts, confirms, and prompts before they appear. Accept or dismiss dialogs via CDP even while JavaScript is blocked, and check pending dialog status.
Instructions
Configure handling of alerts, confirms and prompts. Set it BEFORE triggering the action that opens the dialog. Uses CDP Page.javascriptDialogOpening, so it works even while the dialog blocks all JS.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | No | Text entered into prompt dialogs (with action accept) | |
| action | Yes | accept or dismiss the next dialog; get_status: pending ones |