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

waitForEvent(
  event: PageEvent
  options: TimeoutOptions
): Boolean!

Arguments

event

PageEvent The page event to wait for. See the PageEvent enum for available values.

options

TimeoutOptions Options for waiting, such as timeout.

Returns

Boolean! The Boolean scalar type represents true or false.