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, )