Skip to main content
Version: 8.0.2

Network

handleRoute

Method allowing to focus a specific element on a page.

ParameterTypeDescription
{ url, handler }HandleRouteParamsHandle route URL and handler parameters.

HandleRouteParams

ParameterTypeDescription
urlstring / RegExp / ((url: URL) => boolean)URL of the route.
handler(route: Route, request: Request) => Promise<void>Handler.

Basic Usage

        await I.handleRoute(
{
url: '**/*.{png,jpg,jpeg}',
handler: route => route.abort()
}
)
await I.goto(`https://myURL.com`)