> ## 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.

# waitForEvent

Waits for a specific page event to occur, such as `LOAD`, `REQUEST`, or `CONSOLE`.
Example: `waitForEvent(event: LOAD, options: { timeout: 10000 })`
Returns true if the event occurred within the timeout.

## Definition

```graphql theme={null}
waitForEvent(
  event: PageEvent
  options: TimeoutOptions
): Boolean!
```

## Arguments

### `event`

[PageEvent](/reference/graphql/enums/page-event)

The page event to wait for. See the PageEvent 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`.
