Waiting Commands
Pause execution for a specified duration.
| Parameter | Type | Required | Description |
|---|---|---|---|
timeout |
number | ✅ | Duration in milliseconds |
wait_for_load_state
Section titled “wait_for_load_state”Wait for the page to reach a specific load state.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
state |
string | ❌ | load |
State: load, domcontentloaded, networkidle |
timeout |
number | ❌ | 30000 | Max wait time (ms) |
wait_for_selector
Section titled “wait_for_selector”Wait for an element to appear in the DOM.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
selector |
string | ✅ | — | Element selector |
iframe |
string | ❌ | — | Iframe selector |
timeout |
number | ❌ | 30000 | Max wait time (ms) |
wait_for_state
Section titled “wait_for_state”Wait for an element to reach a specific state.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
selector |
string | ✅ | — | Element selector |
state |
string | ❌ | visible |
State: visible, hidden, attached, detached |
iframe |
string | ❌ | — | Iframe selector |
timeout |
number | ❌ | 30000 | Max wait time (ms) |
wait_for_download
Section titled “wait_for_download”Click an element and wait for a file download to complete.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
selector |
string | ✅ | — | Element to click |
save_path |
string | ✅ | — | Local path to save the downloaded file |
iframe |
string | ❌ | — | Iframe selector |
timeout |
number | ❌ | 30000 | Max wait time (ms) |