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

Method wait_for_function

playwright/_impl/_frame.py:918–933  ·  view source on GitHub ↗
(
        self,
        expression: str,
        arg: Serializable = None,
        timeout: float = None,
        polling: Union[float, Literal["raf"]] = None,
    )

Source from the content-addressed store, hash-verified

916 await self._channel.send("waitForTimeout", None, {"waitTimeout": timeout})
917
918 async def wait_for_function(
919 self,
920 expression: str,
921 arg: Serializable = None,
922 timeout: float = None,
923 polling: Union[float, Literal["raf"]] = None,
924 ) -> JSHandle:
925 if isinstance(polling, str) and polling != "raf":
926 raise Error(f"Unknown polling option: {polling}")
927 params = locals_to_params(locals())
928 params["arg"] = serialize_argument(arg)
929 if polling is not None and polling != "raf":
930 params["pollingInterval"] = polling
931 return from_channel(
932 await self._channel.send("waitForFunction", self._timeout, params)
933 )
934
935 async def title(self) -> str:
936 return await self._channel.send("title", None)

Callers

nothing calls this directly

Calls 5

ErrorClass · 0.90
locals_to_paramsFunction · 0.90
serialize_argumentFunction · 0.90
from_channelFunction · 0.90
sendMethod · 0.45

Tested by

no test coverage detected