MCPcopy Create free account
hub / github.com/Vinyzu/Botright / handler_proxy

Method handler_proxy

botright/playwright_mock/browser.py:232–237  ·  view source on GitHub ↗
(route: PlaywrightRoute, request: PlaywrightRequest)

Source from the content-addressed store, hash-verified

230 if len(inspect.signature(handler).parameters) == 2: # Checking how many parameters the callable expects
231
232 def handler_proxy(route: PlaywrightRoute, request: PlaywrightRequest):
233 page = request.frame.page
234
235 route = Route(route, Page(page, self, self.faker))
236 request = Request(request, Page(page, self, self.faker))
237 return handler(route, request) # type: ignore
238
239 self._route_proxies[handler] = handler_proxy
240 await self._origin_route(url=url, handler=handler_proxy, times=times)

Callers

nothing calls this directly

Calls 4

RouteClass · 0.85
PageClass · 0.85
RequestClass · 0.85
handlerFunction · 0.85

Tested by

no test coverage detected