From 6939e0f2c68c3de5a479b8ab9e0a9c757244f41f Mon Sep 17 00:00:00 2001 From: Max Schmitt Date: Fri, 3 Feb 2023 13:34:51 +0100 Subject: [PATCH] chore: fix page.pause() (#1749) chore: fix page.pause --- playwright/_impl/_page.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/playwright/_impl/_page.py b/playwright/_impl/_page.py index 4f7a5d03b..1b930d950 100644 --- a/playwright/_impl/_page.py +++ b/playwright/_impl/_page.py @@ -955,7 +955,10 @@ def request(self) -> "APIRequestContext": async def pause(self) -> None: await asyncio.wait( - [self._browser_context._pause(), self._closed_or_crashed_future], + [ + asyncio.create_task(self._browser_context._pause()), + self._closed_or_crashed_future, + ], return_when=asyncio.FIRST_COMPLETED, )