Network
handleRoute
Method allowing to focus a specific element on a page.
Parameter | Type | Description |
---|---|---|
{ url, handler } | HandleRouteParams | Handle route URL and handler parameters. |
HandleRouteParams
Parameter | Type | Description |
---|---|---|
url | string / 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`)