browserlane
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

FlagDescription
--state stringState to wait for: attached, visible, hidden (default "attached")
--timeout intTimeout in milliseconds (default 30000)

Global flags

FlagDescription
--headlessHide browser window (visible by default)
--jsonOutput as JSON
-v, --verboseEnable 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 disappear

bl wait fn

Wait until a JS expression returns truthy

Usage

bl wait fn [expression] [flags]

Flags

FlagDescription
--timeout floatTimeout in milliseconds (default 30000)

Global flags

FlagDescription
--headlessHide browser window (visible by default)
--jsonOutput as JSON
-v, --verboseEnable 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 timeout

bl wait load

Wait until the page is fully loaded

Usage

bl wait load [flags]

Flags

FlagDescription
--timeout intTimeout in milliseconds (default 30000)

Global flags

FlagDescription
--headlessHide browser window (visible by default)
--jsonOutput as JSON
-v, --verboseEnable debug logging

Examples

bl wait load
# Wait until document.readyState is "complete"

bl wait load --timeout 10000
# Wait up to 10 seconds

bl wait text

Wait until text appears on the page

Usage

bl wait text [text] [flags]

Flags

FlagDescription
--timeout floatTimeout in milliseconds (default 30000)

Global flags

FlagDescription
--headlessHide browser window (visible by default)
--jsonOutput as JSON
-v, --verboseEnable 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

FlagDescription
--timeout intTimeout in milliseconds (default 30000)

Global flags

FlagDescription
--headlessHide browser window (visible by default)
--jsonOutput as JSON
-v, --verboseEnable debug logging

Examples

bl wait url "/dashboard"
# Wait until URL contains "/dashboard"

bl wait url "success" --timeout 10000
# Wait up to 10 seconds

On this page