browser_handle_dialog
Handle JavaScript alert, confirm, or prompt dialogs on the active tab by setting the desired action before the dialog appears, preventing tab freeze.
Instructions
Arm automatic handling of the next JavaScript alert/confirm/prompt on the active tab, then return immediately. Call this BEFORE the click that opens the dialog - a dialog freezes the tab, so nothing can be clicked once it is on screen. Pass wait=true only when the dialog is already opening.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | No | Text to enter for prompt() dialogs | |
| wait | No | Block until a dialog appears instead of arming and returning (default: false). Only use when the dialog is already on its way. | |
| action | No | Accept or dismiss the dialog (default: accept) | |
| timeout | No | How long the arming stays active in ms (default: 60000) |