From 257c0adcc88b85703bf248c75316c7026f373a59 Mon Sep 17 00:00:00 2001 From: Max Schmitt Date: Wed, 14 Jul 2021 11:30:30 +0200 Subject: [PATCH] feat(roll): roll Playwright to 1.13.0-next-1626254028000 --- playwright/_impl/_api_structures.py | 4 +-- playwright/_impl/_frame.py | 4 +-- playwright/_impl/_page.py | 4 +-- playwright/async_api/_generated.py | 34 ++++++++++++++++------- playwright/sync_api/_generated.py | 42 ++++++++++++++++++++++------- setup.py | 2 +- 6 files changed, 65 insertions(+), 25 deletions(-) diff --git a/playwright/_impl/_api_structures.py b/playwright/_impl/_api_structures.py index e96c8186e..6eec5f690 100644 --- a/playwright/_impl/_api_structures.py +++ b/playwright/_impl/_api_structures.py @@ -130,5 +130,5 @@ class SecurityDetails(TypedDict): issuer: Optional[str] protocol: Optional[str] subjectName: Optional[str] - validFrom: Optional[int] - validTo: Optional[int] + validFrom: Optional[float] + validTo: Optional[float] diff --git a/playwright/_impl/_frame.py b/playwright/_impl/_frame.py index 1a45e2790..268beb110 100644 --- a/playwright/_impl/_frame.py +++ b/playwright/_impl/_frame.py @@ -278,10 +278,10 @@ async def is_editable(self, selector: str, timeout: float = None) -> bool: async def is_enabled(self, selector: str, timeout: float = None) -> bool: return await self._channel.send("isEnabled", locals_to_params(locals())) - async def is_hidden(self, selector: str) -> bool: + async def is_hidden(self, selector: str, timeout: float = None) -> bool: return await self._channel.send("isHidden", locals_to_params(locals())) - async def is_visible(self, selector: str) -> bool: + async def is_visible(self, selector: str, timeout: float = None) -> bool: return await self._channel.send("isVisible", locals_to_params(locals())) async def dispatch_event( diff --git a/playwright/_impl/_page.py b/playwright/_impl/_page.py index 766b4b0fa..09a01afb2 100644 --- a/playwright/_impl/_page.py +++ b/playwright/_impl/_page.py @@ -339,10 +339,10 @@ async def is_editable(self, selector: str, timeout: float = None) -> bool: async def is_enabled(self, selector: str, timeout: float = None) -> bool: return await self._main_frame.is_enabled(**locals_to_params(locals())) - async def is_hidden(self, selector: str) -> bool: + async def is_hidden(self, selector: str, timeout: float = None) -> bool: return await self._main_frame.is_hidden(**locals_to_params(locals())) - async def is_visible(self, selector: str) -> bool: + async def is_visible(self, selector: str, timeout: float = None) -> bool: return await self._main_frame.is_visible(**locals_to_params(locals())) async def dispatch_event( diff --git a/playwright/async_api/_generated.py b/playwright/async_api/_generated.py index 225a1a56f..c8d0b8f3e 100644 --- a/playwright/async_api/_generated.py +++ b/playwright/async_api/_generated.py @@ -404,7 +404,7 @@ async def security_details(self) -> typing.Optional[SecurityDetails]: Returns ------- - Union[{issuer: Union[str, NoneType], protocol: Union[str, NoneType], subjectName: Union[str, NoneType], validFrom: Union[int, NoneType], validTo: Union[int, NoneType]}, NoneType] + Union[{issuer: Union[str, NoneType], protocol: Union[str, NoneType], subjectName: Union[str, NoneType], validFrom: Union[float, NoneType], validTo: Union[float, NoneType]}, NoneType] """ return mapping.from_impl_nullable( @@ -3283,7 +3283,7 @@ async def is_enabled(self, selector: str, *, timeout: float = None) -> bool: ) ) - async def is_hidden(self, selector: str) -> bool: + async def is_hidden(self, selector: str, *, timeout: float = None) -> bool: """Frame.is_hidden Returns whether the element is hidden, the opposite of [visible](./actionability.md#visible). `selector` that does not @@ -3294,6 +3294,9 @@ async def is_hidden(self, selector: str) -> bool: selector : str A selector to search for element. If there are multiple elements satisfying the selector, the first will be used. See [working with selectors](./selectors.md) for more details. + timeout : Union[float, NoneType] + Maximum time in milliseconds, defaults to 30 seconds, pass `0` to disable timeout. The default value can be changed by + using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods. Returns ------- @@ -3302,11 +3305,12 @@ async def is_hidden(self, selector: str) -> bool: return mapping.from_maybe_impl( await self._async( - "frame.is_hidden", self._impl_obj.is_hidden(selector=selector) + "frame.is_hidden", + self._impl_obj.is_hidden(selector=selector, timeout=timeout), ) ) - async def is_visible(self, selector: str) -> bool: + async def is_visible(self, selector: str, *, timeout: float = None) -> bool: """Frame.is_visible Returns whether the element is [visible](./actionability.md#visible). `selector` that does not match any elements is @@ -3317,6 +3321,9 @@ async def is_visible(self, selector: str) -> bool: selector : str A selector to search for element. If there are multiple elements satisfying the selector, the first will be used. See [working with selectors](./selectors.md) for more details. + timeout : Union[float, NoneType] + Maximum time in milliseconds, defaults to 30 seconds, pass `0` to disable timeout. The default value can be changed by + using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods. Returns ------- @@ -3325,7 +3332,8 @@ async def is_visible(self, selector: str) -> bool: return mapping.from_maybe_impl( await self._async( - "frame.is_visible", self._impl_obj.is_visible(selector=selector) + "frame.is_visible", + self._impl_obj.is_visible(selector=selector, timeout=timeout), ) ) @@ -5455,7 +5463,7 @@ async def is_enabled(self, selector: str, *, timeout: float = None) -> bool: ) ) - async def is_hidden(self, selector: str) -> bool: + async def is_hidden(self, selector: str, *, timeout: float = None) -> bool: """Page.is_hidden Returns whether the element is hidden, the opposite of [visible](./actionability.md#visible). `selector` that does not @@ -5466,6 +5474,9 @@ async def is_hidden(self, selector: str) -> bool: selector : str A selector to search for element. If there are multiple elements satisfying the selector, the first will be used. See [working with selectors](./selectors.md) for more details. + timeout : Union[float, NoneType] + Maximum time in milliseconds, defaults to 30 seconds, pass `0` to disable timeout. The default value can be changed by + using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods. Returns ------- @@ -5474,11 +5485,12 @@ async def is_hidden(self, selector: str) -> bool: return mapping.from_maybe_impl( await self._async( - "page.is_hidden", self._impl_obj.is_hidden(selector=selector) + "page.is_hidden", + self._impl_obj.is_hidden(selector=selector, timeout=timeout), ) ) - async def is_visible(self, selector: str) -> bool: + async def is_visible(self, selector: str, *, timeout: float = None) -> bool: """Page.is_visible Returns whether the element is [visible](./actionability.md#visible). `selector` that does not match any elements is @@ -5489,6 +5501,9 @@ async def is_visible(self, selector: str) -> bool: selector : str A selector to search for element. If there are multiple elements satisfying the selector, the first will be used. See [working with selectors](./selectors.md) for more details. + timeout : Union[float, NoneType] + Maximum time in milliseconds, defaults to 30 seconds, pass `0` to disable timeout. The default value can be changed by + using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods. Returns ------- @@ -5497,7 +5512,8 @@ async def is_visible(self, selector: str) -> bool: return mapping.from_maybe_impl( await self._async( - "page.is_visible", self._impl_obj.is_visible(selector=selector) + "page.is_visible", + self._impl_obj.is_visible(selector=selector, timeout=timeout), ) ) diff --git a/playwright/sync_api/_generated.py b/playwright/sync_api/_generated.py index 3a444150e..e5c212be6 100644 --- a/playwright/sync_api/_generated.py +++ b/playwright/sync_api/_generated.py @@ -404,7 +404,7 @@ def security_details(self) -> typing.Optional[SecurityDetails]: Returns ------- - Union[{issuer: Union[str, NoneType], protocol: Union[str, NoneType], subjectName: Union[str, NoneType], validFrom: Union[int, NoneType], validTo: Union[int, NoneType]}, NoneType] + Union[{issuer: Union[str, NoneType], protocol: Union[str, NoneType], subjectName: Union[str, NoneType], validFrom: Union[float, NoneType], validTo: Union[float, NoneType]}, NoneType] """ return mapping.from_impl_nullable( @@ -3261,7 +3261,7 @@ def is_enabled(self, selector: str, *, timeout: float = None) -> bool: ) ) - def is_hidden(self, selector: str) -> bool: + def is_hidden(self, selector: str, *, timeout: float = None) -> bool: """Frame.is_hidden Returns whether the element is hidden, the opposite of [visible](./actionability.md#visible). `selector` that does not @@ -3272,6 +3272,9 @@ def is_hidden(self, selector: str) -> bool: selector : str A selector to search for element. If there are multiple elements satisfying the selector, the first will be used. See [working with selectors](./selectors.md) for more details. + timeout : Union[float, NoneType] + Maximum time in milliseconds, defaults to 30 seconds, pass `0` to disable timeout. The default value can be changed by + using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods. Returns ------- @@ -3279,10 +3282,13 @@ def is_hidden(self, selector: str) -> bool: """ return mapping.from_maybe_impl( - self._sync("frame.is_hidden", self._impl_obj.is_hidden(selector=selector)) + self._sync( + "frame.is_hidden", + self._impl_obj.is_hidden(selector=selector, timeout=timeout), + ) ) - def is_visible(self, selector: str) -> bool: + def is_visible(self, selector: str, *, timeout: float = None) -> bool: """Frame.is_visible Returns whether the element is [visible](./actionability.md#visible). `selector` that does not match any elements is @@ -3293,6 +3299,9 @@ def is_visible(self, selector: str) -> bool: selector : str A selector to search for element. If there are multiple elements satisfying the selector, the first will be used. See [working with selectors](./selectors.md) for more details. + timeout : Union[float, NoneType] + Maximum time in milliseconds, defaults to 30 seconds, pass `0` to disable timeout. The default value can be changed by + using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods. Returns ------- @@ -3300,7 +3309,10 @@ def is_visible(self, selector: str) -> bool: """ return mapping.from_maybe_impl( - self._sync("frame.is_visible", self._impl_obj.is_visible(selector=selector)) + self._sync( + "frame.is_visible", + self._impl_obj.is_visible(selector=selector, timeout=timeout), + ) ) def dispatch_event( @@ -5417,7 +5429,7 @@ def is_enabled(self, selector: str, *, timeout: float = None) -> bool: ) ) - def is_hidden(self, selector: str) -> bool: + def is_hidden(self, selector: str, *, timeout: float = None) -> bool: """Page.is_hidden Returns whether the element is hidden, the opposite of [visible](./actionability.md#visible). `selector` that does not @@ -5428,6 +5440,9 @@ def is_hidden(self, selector: str) -> bool: selector : str A selector to search for element. If there are multiple elements satisfying the selector, the first will be used. See [working with selectors](./selectors.md) for more details. + timeout : Union[float, NoneType] + Maximum time in milliseconds, defaults to 30 seconds, pass `0` to disable timeout. The default value can be changed by + using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods. Returns ------- @@ -5435,10 +5450,13 @@ def is_hidden(self, selector: str) -> bool: """ return mapping.from_maybe_impl( - self._sync("page.is_hidden", self._impl_obj.is_hidden(selector=selector)) + self._sync( + "page.is_hidden", + self._impl_obj.is_hidden(selector=selector, timeout=timeout), + ) ) - def is_visible(self, selector: str) -> bool: + def is_visible(self, selector: str, *, timeout: float = None) -> bool: """Page.is_visible Returns whether the element is [visible](./actionability.md#visible). `selector` that does not match any elements is @@ -5449,6 +5467,9 @@ def is_visible(self, selector: str) -> bool: selector : str A selector to search for element. If there are multiple elements satisfying the selector, the first will be used. See [working with selectors](./selectors.md) for more details. + timeout : Union[float, NoneType] + Maximum time in milliseconds, defaults to 30 seconds, pass `0` to disable timeout. The default value can be changed by + using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods. Returns ------- @@ -5456,7 +5477,10 @@ def is_visible(self, selector: str) -> bool: """ return mapping.from_maybe_impl( - self._sync("page.is_visible", self._impl_obj.is_visible(selector=selector)) + self._sync( + "page.is_visible", + self._impl_obj.is_visible(selector=selector, timeout=timeout), + ) ) def dispatch_event( diff --git a/setup.py b/setup.py index 2cc574bfa..6aef80b99 100644 --- a/setup.py +++ b/setup.py @@ -28,7 +28,7 @@ InWheel = None from wheel.bdist_wheel import bdist_wheel as BDistWheelCommand -driver_version = "1.13.0-next-1625812834000" +driver_version = "1.13.0-next-1626254028000" def extractall(zip: zipfile.ZipFile, path: str) -> None: