> ## 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_wait

> Wait until text appears/disappears, the URL contains a string, or a ref reaches a state.

Wait until text appears/disappears, the URL contains a string, or a ref reaches a state. Polls up to timeoutMs (default 15000).

## 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="text" type="string">
   
</ParamField>

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

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

<ParamField body="ref" type="string">
  Element ref from browser\_snapshot, e.g. "e12"
</ParamField>

<ParamField body="state" type="enum">
  One of: `visible`, `hidden`, `enabled`.
</ParamField>

<ParamField body="timeoutMs" type="integer">
  Range: … to 120000.
</ParamField>

## Example

```json theme={null}
{
  "tabId": 1234,
  "text": "Order confirmed",
  "timeoutMs": 20000
}
```

```json Until the URL changes theme={null}
{
  "tabId": 1234,
  "url": "/dashboard"
}
```

```json Until a ref is enabled theme={null}
{
  "tabId": 1234,
  "ref": "e3",
  "state": "enabled"
}
```
