CLI referenceNavigation
bl wait
Wait for an element, URL, text, page load, or JS condition
Wait for an element, URL, text, page load, or JS condition
Usage
bl wait [selector] [flags]
bl wait [command]Flags
| Flag | Description |
|---|---|
--state string | State to wait for: attached, visible, hidden (default "attached") |
--timeout int | Timeout in milliseconds (default 30000) |
Global flags
| Flag | Description |
|---|---|
--headless | Hide browser window (visible by default) |
--json | Output as JSON |
-v, --verbose | Enable debug logging |
Examples
bl wait "div.loaded"
# Wait for element to exist in DOM
bl wait "div.loaded" --state visible
# Wait for element to be visible
bl wait "div.spinner" --state hidden --timeout 5000
# Wait for spinner to disappearbl wait fn
Wait until a JS expression returns truthy
Usage
bl wait fn [expression] [flags]Flags
| Flag | Description |
|---|---|
--timeout float | Timeout in milliseconds (default 30000) |
Global flags
| Flag | Description |
|---|---|
--headless | Hide browser window (visible by default) |
--json | Output as JSON |
-v, --verbose | Enable debug logging |
Examples
bl wait fn "document.readyState === 'complete'"
# Wait for page to be fully loaded
bl wait fn "window.ready === true" --timeout 10000
# Wait for custom condition with timeoutbl wait load
Wait until the page is fully loaded
Usage
bl wait load [flags]Flags
| Flag | Description |
|---|---|
--timeout int | Timeout in milliseconds (default 30000) |
Global flags
| Flag | Description |
|---|---|
--headless | Hide browser window (visible by default) |
--json | Output as JSON |
-v, --verbose | Enable debug logging |
Examples
bl wait load
# Wait until document.readyState is "complete"
bl wait load --timeout 10000
# Wait up to 10 secondsbl wait text
Wait until text appears on the page
Usage
bl wait text [text] [flags]Flags
| Flag | Description |
|---|---|
--timeout float | Timeout in milliseconds (default 30000) |
Global flags
| Flag | Description |
|---|---|
--headless | Hide browser window (visible by default) |
--json | Output as JSON |
-v, --verbose | Enable debug logging |
Examples
bl wait text "Welcome"
# Waits until "Welcome" appears on the page
bl wait text "Success" --timeout 10000
# Wait with custom timeout (10 seconds)bl wait url
Wait until the page URL contains a substring
Usage
bl wait url [pattern] [flags]Flags
| Flag | Description |
|---|---|
--timeout int | Timeout in milliseconds (default 30000) |
Global flags
| Flag | Description |
|---|---|
--headless | Hide browser window (visible by default) |
--json | Output as JSON |
-v, --verbose | Enable debug logging |
Examples
bl wait url "/dashboard"
# Wait until URL contains "/dashboard"
bl wait url "success" --timeout 10000
# Wait up to 10 seconds