hubcap waitload

Wait for the page load event to fire.

When to use

Use waitload to block until the page load event fires. Use goto --wait for navigation plus load in one step. Use waitidle to wait for network quiet instead.

Usage

hubcap waitload [--timeout <duration>]

Arguments

None.

Flags

FlagTypeDefaultDescription
—timeoutduration30sMaximum wait time

Output

FieldTypeDescription
loadedboolWhether the page load event fired
{"loaded":true}

Errors

ConditionExit codeStderr
Chrome not connected2error: connecting to Chrome: ...
Load event not fired in time3error: timeout

Examples

Wait for page load with default timeout:

hubcap waitload

Wait with a custom timeout:

hubcap waitload --timeout 60s

Reload and wait for the page to finish loading (chaining):

hubcap reload && hubcap waitload

See also

  • goto - Navigate to a URL (supports —wait)
  • waitnav - Wait for any navigation event
  • waitidle - Wait for network idle
  • waiturl - Wait for the URL to match a pattern