Page.waitForResponse() method
Signature:
class Page {
waitForResponse(
urlOrPredicate: string | AwaitablePredicate<HTTPResponse>,
options?: WaitTimeoutOptions
): Promise<HTTPResponse>;
}
Parameters
Parameter | Type | Description |
---|---|---|
urlOrPredicate | string | AwaitablePredicate<HTTPResponse> | A URL or predicate to wait for. |
options | (Optional) Optional waiting parameters |
Returns:
Promise<HTTPResponse>
Promise which resolves to the matched response.