Skip to content

Commit

Permalink
chore: fix page.pause() (#1749)
Browse files Browse the repository at this point in the history
chore: fix page.pause
  • Loading branch information
mxschmitt committed Feb 3, 2023
1 parent 5ba8225 commit 6939e0f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion playwright/_impl/_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)

Expand Down

0 comments on commit 6939e0f

Please sign in to comment.