> ## Documentation Index
> Fetch the complete documentation index at: https://docs.extractbase.com/llms.txt
> Use this file to discover all available pages before exploring further.

# waitForLoadState

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

```graphql theme={null}
waitForLoadState(
  state: LoadState!
  options: TimeoutOptions
): Boolean!
```

## Arguments

### `state`

[LoadState!](/reference/graphql/enums/load-state)

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

### `options`

[TimeoutOptions](/reference/graphql/inputs/timeout-options)

Options for waiting, such as timeout.

## Returns

[Boolean!](/reference/graphql/scalars/boolean)

The `Boolean` scalar type represents `true` or `false`.
