module Playwright::Route

Overview

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.

Defined in:

playwright/route.cr

Instance Method Summary

Instance Method Detail

abstract def abort(error_code : String | Nil) : Nil #

Aborts the route's request.


[View source]
def abort : Nil #

[View source]
abstract def continue(overrides : ContinueOverrides | Nil) : Nil #

Continues route's request with optional overrides.


[View source]
def continue : Nil #

[View source]
abstract def 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:


[View source]
abstract def request : Request #

A request to be routed.


[View source]