browser_handle_dialog
Accept or dismiss JavaScript alert, confirm, prompt, or beforeunload dialogs in a specified tab, optionally supplying prompt text.
Instructions
Answers the JavaScript dialog (alert, confirm, prompt, beforeunload) open in tab tab_id (never another tab's dialog).
No dialog is ever accepted automatically: when a command opens one, its response reports it (dialog / pendingDialogs fields: type and message, for the targeted tab only). Read the message, then choose:
accept=True: OK / Leave page; accept=False: Cancel / Stay.
prompt_text: text entered in a prompt dialog before accepting.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| accept | Yes | ||
| tab_id | Yes | Your tab's id (from browser_new_tab, or a tab adopted with browser_adopt_tab). | |
| prompt_text | No |