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

Function handler

tests/sync/test_har.py:298–304  ·  view source on GitHub ↗
(route: Route)

Source from the content-addressed store, hash-verified

296 page = context.new_page()
297
298 def handler(route: Route) -> None:
299 assert route.request.url == "http://no.playwright/"
300 route.fulfill(
301 status=200,
302 content_type="text/html",
303 body='<script src="./script.js"></script><div>hello</div>',
304 )
305
306 context.route("http://no.playwright/", handler)
307 page.goto("http://no.playwright/")

Callers 4

wrapper_funcMethod · 0.50
_handlerMethod · 0.50
onOpenMethod · 0.50

Calls 1

fulfillMethod · 0.45

Tested by

no test coverage detected