We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bfb2869 commit d55a7edCopy full SHA for d55a7ed
playwright/_impl/_page.py
@@ -210,10 +210,16 @@ def __init__(
210
)
211
self._closed_or_crashed_future: asyncio.Future = asyncio.Future()
212
self.on(
213
- Page.Events.Close, lambda _: self._closed_or_crashed_future.set_result(True)
+ Page.Events.Close,
214
+ lambda _: self._closed_or_crashed_future.set_result(True)
215
+ if not self._closed_or_crashed_future.done()
216
+ else None,
217
218
- Page.Events.Crash, lambda _: self._closed_or_crashed_future.set_result(True)
219
+ Page.Events.Crash,
220
221
222
223
224
225
def __repr__(self) -> str:
0 commit comments