> ## Documentation Index
> Fetch the complete documentation index at: https://docs.browspark.krishm.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# browser_dialog

> Accept or dismiss an open JavaScript alert/confirm/prompt/beforeunload dialog.

Accept or dismiss an open JavaScript alert/confirm/prompt/beforeunload dialog. browser\_status shows open dialogs.

## Parameters

<ParamField body="tabId" type="integer">
  Target tab id from browser\_tabs, which lists tabs across all windows. Defaults to the agent's most recently opened usable tab, or the only usable tab. Otherwise select a listed tabId.
</ParamField>

<ParamField body="accept" type="boolean" required default="true">
   
</ParamField>

<ParamField body="promptText" type="string">
   
</ParamField>

## Example

```json theme={null}
{
  "tabId": 1234,
  "accept": true,
  "promptText": "yes"
}
```
