Waits for a network response matching a URL or predicate to occur. Example: waitForResponse(urlOrPredicate: "https://api.example.com/user") Returns true if a matching response occurred within the timeout.

Definition

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

Arguments

urlOrPredicate: String!

A URL string, glob pattern, or JavaScript predicate string to match against response URLs. Example: "https://example.com/data.json"

options: TimeoutOptions

Options for waiting, such as timeout.

Returns

Boolean!

The Boolean scalar type represents true or false.