Waits for a network request matching a URL or predicate to occur. Example: waitForRequest(urlOrPredicate: "**/api/data") Returns true if a matching request occurred within the timeout.

Definition

waitForRequest(
  urlOrPredicate: String!
  options: TimeoutOptions
): Boolean!

Arguments

urlOrPredicate: String!

A URL string, glob pattern, or JavaScript predicate string to match against request URLs. Example: "https://example.com/resource.js" or "**/*.css"

options: TimeoutOptions

Options for waiting, such as timeout.

Returns

Boolean!

The Boolean scalar type represents true or false.