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

Function test_request_continue

tests/async/test_network.py:72–91  ·  view source on GitHub ↗
(page: Page, server: Server)

Source from the content-addressed store, hash-verified

70
71
72async def test_request_continue(page: Page, server: Server) -> None:
73 async def handle_request(
74 route: Route, request: Request, intercepted: List[bool]
75 ) -> None:
76 intercepted.append(True)
77 await route.continue_()
78
79 intercepted: List[bool] = []
80 await page.route(
81 "**/*",
82 lambda route, request: asyncio.create_task(
83 handle_request(route, request, intercepted)
84 ),
85 )
86
87 response = await page.goto(server.EMPTY_PAGE)
88 assert response
89 assert response.ok
90 assert intercepted == [True]
91 assert await page.title() == ""
92
93
94async def test_page_events_request_should_fire_for_navigation_requests(

Callers

nothing calls this directly

Calls 4

handle_requestFunction · 0.70
routeMethod · 0.45
gotoMethod · 0.45
titleMethod · 0.45

Tested by

no test coverage detected