@@ -6774,7 +6774,9 @@ def set_test_id_attribute(self, attribute_name: str) -> None:
67746774
67756775class Clock(SyncBase):
67766776 def install(
6777- self, *, time: typing.Optional[typing.Union[int, str, datetime.datetime]] = None
6777+ self,
6778+ *,
6779+ time: typing.Optional[typing.Union[float, str, datetime.datetime]] = None
67786780 ) -> None:
67796781 """Clock.install
67806782
@@ -6796,7 +6798,7 @@ def install(
67966798
67976799 Parameters
67986800 ----------
6799- time : Union[datetime.datetime, int , str, None]
6801+ time : Union[datetime.datetime, float , str, None]
68006802 Time to initialize with, current system time by default.
68016803 """
68026804
@@ -6826,7 +6828,7 @@ def fast_forward(self, ticks: typing.Union[int, str]) -> None:
68266828 self._sync(self._impl_obj.fast_forward(ticks=ticks))
68276829 )
68286830
6829- def pause_at(self, time: typing.Union[int , str, datetime.datetime]) -> None:
6831+ def pause_at(self, time: typing.Union[float , str, datetime.datetime]) -> None:
68306832 """Clock.pause_at
68316833
68326834 Advance the clock by jumping forward in time and pause the time. Once this method is called, no timers are fired
@@ -6845,7 +6847,8 @@ def pause_at(self, time: typing.Union[int, str, datetime.datetime]) -> None:
68456847
68466848 Parameters
68476849 ----------
6848- time : Union[datetime.datetime, int, str]
6850+ time : Union[datetime.datetime, float, str]
6851+ Time to pause at.
68496852 """
68506853
68516854 return mapping.from_maybe_impl(self._sync(self._impl_obj.pause_at(time=time)))
@@ -6879,7 +6882,7 @@ def run_for(self, ticks: typing.Union[int, str]) -> None:
68796882
68806883 return mapping.from_maybe_impl(self._sync(self._impl_obj.run_for(ticks=ticks)))
68816884
6882- def set_fixed_time(self, time: typing.Union[int , str, datetime.datetime]) -> None:
6885+ def set_fixed_time(self, time: typing.Union[float , str, datetime.datetime]) -> None:
68836886 """Clock.set_fixed_time
68846887
68856888 Makes `Date.now` and `new Date()` return fixed fake time at all times, keeps all the timers running.
@@ -6894,15 +6897,17 @@ def set_fixed_time(self, time: typing.Union[int, str, datetime.datetime]) -> Non
68946897
68956898 Parameters
68966899 ----------
6897- time : Union[datetime.datetime, int , str]
6900+ time : Union[datetime.datetime, float , str]
68986901 Time to be set.
68996902 """
69006903
69016904 return mapping.from_maybe_impl(
69026905 self._sync(self._impl_obj.set_fixed_time(time=time))
69036906 )
69046907
6905- def set_system_time(self, time: typing.Union[int, str, datetime.datetime]) -> None:
6908+ def set_system_time(
6909+ self, time: typing.Union[float, str, datetime.datetime]
6910+ ) -> None:
69066911 """Clock.set_system_time
69076912
69086913 Sets current system time but does not trigger any timers.
@@ -6917,7 +6922,8 @@ def set_system_time(self, time: typing.Union[int, str, datetime.datetime]) -> No
69176922
69186923 Parameters
69196924 ----------
6920- time : Union[datetime.datetime, int, str]
6925+ time : Union[datetime.datetime, float, str]
6926+ Time to be set.
69216927 """
69226928
69236929 return mapping.from_maybe_impl(
@@ -8689,22 +8695,6 @@ def run(playwright: Playwright):
86898695 run(playwright)
86908696 ```
86918697
8692- An example of passing an element handle:
8693-
8694- ```py
8695- def print(source, element):
8696- print(element.text_content())
8697-
8698- page.expose_binding(\"clicked\", print, handle=true)
8699- page.set_content(\"\"\"
8700- <script>
8701- document.addEventListener('click', event => window.clicked(event.target));
8702- </script>
8703- <div>Click me</div>
8704- <div>Or click me</div>
8705- \"\"\")
8706- ```
8707-
87088698 Parameters
87098699 ----------
87108700 name : str
@@ -8714,6 +8704,7 @@ def print(source, element):
87148704 handle : Union[bool, None]
87158705 Whether to pass the argument as a handle, instead of passing by value. When passing a handle, only one argument is
87168706 supported. When passing by value, multiple arguments are supported.
8707+ Deprecated: This option will be removed in the future.
87178708 """
87188709
87198710 return mapping.from_maybe_impl(
@@ -12871,22 +12862,6 @@ def run(playwright: Playwright):
1287112862 run(playwright)
1287212863 ```
1287312864
12874- An example of passing an element handle:
12875-
12876- ```py
12877- def print(source, element):
12878- print(element.text_content())
12879-
12880- context.expose_binding(\"clicked\", print, handle=true)
12881- page.set_content(\"\"\"
12882- <script>
12883- document.addEventListener('click', event => window.clicked(event.target));
12884- </script>
12885- <div>Click me</div>
12886- <div>Or click me</div>
12887- \"\"\")
12888- ```
12889-
1289012865 Parameters
1289112866 ----------
1289212867 name : str
@@ -12896,6 +12871,7 @@ def print(source, element):
1289612871 handle : Union[bool, None]
1289712872 Whether to pass the argument as a handle, instead of passing by value. When passing a handle, only one argument is
1289812873 supported. When passing by value, multiple arguments are supported.
12874+ Deprecated: This option will be removed in the future.
1289912875 """
1290012876
1290112877 return mapping.from_maybe_impl(
0 commit comments