Skip to content

Commit 2607b03

Browse files
authored
chore: remove expect_dialog context manager from the sync api (microsoft#331)
1 parent b84d2ae commit 2607b03

File tree

3 files changed

+3
-11
lines changed

3 files changed

+3
-11
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Playwright is a Python library to automate [Chromium](https://www.chromium.org/H
66

77
| | Linux | macOS | Windows |
88
| :--- | :---: | :---: | :---: |
9-
| Chromium <!-- GEN:chromium-version -->88.0.4324.0<!-- GEN:stop --> ||||
9+
| Chromium <!-- GEN:chromium-version -->88.0.4316.0<!-- GEN:stop --> ||||
1010
| WebKit <!-- GEN:webkit-version -->14.0<!-- GEN:stop --> ||||
1111
| Firefox <!-- GEN:firefox-version -->83.0<!-- GEN:stop --> ||||
1212

playwright/sync_api.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5498,16 +5498,6 @@ def expect_console_message(
54985498
self._loop, self._impl_obj.waitForEvent(event, predicate, timeout)
54995499
)
55005500

5501-
def expect_dialog(
5502-
self,
5503-
predicate: typing.Union[typing.Callable[["Dialog"], bool]] = None,
5504-
timeout: int = None,
5505-
) -> EventContextManager["Dialog"]:
5506-
event = "dialog"
5507-
return EventContextManager(
5508-
self._loop, self._impl_obj.waitForEvent(event, predicate, timeout)
5509-
)
5510-
55115501
def expect_download(
55125502
self,
55135503
predicate: typing.Union[typing.Callable[["Download"], bool]] = None,

scripts/generate_sync_api.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ def generate(t: Any) -> None:
7474
prefix = " return " + prefix + f"self._impl_obj.{name}"
7575
print(f"{prefix}{arguments(value, len(prefix))}{suffix}")
7676
for [name, value] in t.__dict__.items():
77+
if name in ["expect_dialog"]:
78+
continue
7779
if (
7880
not name.startswith("_")
7981
and isinstance(value, FunctionType)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy