Beispiel #1
0
 async def waitForFunction(
     self,
     expression: str,
     arg: Serializable = None,
     force_expr: bool = None,
     timeout: int = None,
     polling: Union[int, Literal["raf"]] = None,
 ) -> JSHandle:
     if not is_function_body(expression):
         force_expr = True
     return await self._main_frame.waitForFunction(**locals_to_params(locals()))
Beispiel #2
0
 async def evaluateHandle(self,
                          expression: str,
                          arg: Serializable = None,
                          force_expr: bool = None) -> JSHandle:
     if not is_function_body(expression):
         force_expr = True
     return from_channel(await self._channel.send(
         "evaluateExpressionHandle",
         dict(
             expression=expression,
             isFunction=not (force_expr),
             arg=serialize_argument(arg),
         ),
     ))
Beispiel #3
0
 async def waitForFunction(
     self,
     expression: str,
     arg: Serializable = None,
     force_expr: bool = None,
     timeout: int = None,
     polling: Union[int, Literal["raf"]] = None,
 ) -> JSHandle:
     if not is_function_body(expression):
         force_expr = True
     params = locals_to_params(locals())
     params["isFunction"] = not (force_expr)
     params["arg"] = serialize_argument(arg)
     return from_channel(await self._channel.send("waitForFunction",
                                                  params))