Handle JavaScript Dialog
browser_handle_dialogManage browser dialogs by setting accept or dismiss actions before they appear, then trigger the dialog and inspect the resulting navigation or state changes.
Instructions
Use when an alert, confirm, prompt, or beforeunload dialog blocks or changes the browser reproduction. Preconditions: configure the intended accept or dismiss behavior before the dialog appears. Next: trigger the dialog and inspect the resulting action, navigation, or state. Sensitivity: accepting prompts or confirmations can submit text, authorize actions, or mutate application state.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| once | No | ||
| action | Yes | ||
| promptText | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| error | No | ||
| result | No |