Waits for the page to reach a specific load state, such as DOM_CONTENT_LOADED or NETWORK_IDLE. Example: waitForLoadState(state: NETWORK_IDLE) Returns true if the load state was reached within the timeout.

Definition

waitForLoadState(
  state: LoadState!
  options: TimeoutOptions
): Boolean!

Arguments

state

LoadState! The load state to wait for. See the LoadState enum for available values.

options

TimeoutOptions Options for waiting, such as timeout.

Returns

Boolean! The Boolean scalar type represents true or false.