MCPcopy Index your code
hub / github.com/microsoft/playwright-python / route_handler

Function route_handler

tests/async/test_page_request_intercept.py:91–93  ·  view source on GitHub ↗
(route: Route)

Source from the content-addressed store, hash-verified

89 page: Page, server: Server
90) -> None:
91 async def route_handler(route: Route) -> None:
92 response = await route.fetch()
93 await route.fulfill(response=response, body="hello")
94
95 await page.context.route("**/*", route_handler)
96 await page.set_content(f'<a target=_blank href="{server.EMPTY_PAGE}">click me</a>')

Callers

nothing calls this directly

Calls 2

fetchMethod · 0.45
fulfillMethod · 0.45

Tested by

no test coverage detected