module

Playwright::Route

Whenever a network route is set up with page.route(url, handler) or browserContext.route(url, handler), the Route object allows to handle the route.

Instance methods

abort(error_code : String | Nil) : Nil

Aborts the route's request.

Source
abort
Source
continue(overrides : ContinueOverrides | Nil) : Nil

Continues route's request with optional overrides.

Source
continue
Source
fulfill(response : FulfillResponse) : Nil

Fulfills route's request with given response. An example of fulfilling all requests with 404 responses:

An example of serving static file:

Source
request

A request to be routed.

Source

Nested types