MCPcopy Create free account
hub / github.com/microsoft/playwright-python / my_predicate

Method my_predicate

playwright/_impl/_page.py:1305–1312  ·  view source on GitHub ↗
(request: Request)

Source from the content-addressed store, hash-verified

1303 timeout: float = None,
1304 ) -> EventContextManagerImpl[Request]:
1305 def my_predicate(request: Request) -> Union[bool, Awaitable[bool]]:
1306 if not callable(urlOrPredicate):
1307 return url_matches(
1308 self._browser_context._base_url,
1309 request.url,
1310 urlOrPredicate,
1311 )
1312 return urlOrPredicate(request)
1313
1314 trimmed_url = trim_url(urlOrPredicate)
1315 log_line = f"waiting for request {trimmed_url}" if trimmed_url else None

Callers

nothing calls this directly

Calls 1

url_matchesFunction · 0.90

Tested by

no test coverage detected