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

Function handle

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

Source from the content-addressed store, hash-verified

31 server.set_route("/slow", _handler)
32
33 async def handle(route: Route) -> None:
34 with pytest.raises(Error) as error:
35 await route.fetch(timeout=1000)
36 assert "Route.fetch: Timeout 1000ms exceeded." in error.value.message
37
38 await page.route("**/*", lambda route: handle(route))
39 with pytest.raises(Error) as error:

Calls 2

fetchMethod · 0.45
fulfillMethod · 0.45

Tested by

no test coverage detected