Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions contributing/samples/multimodal/computer_use/playwright.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ async def current_state(self) -> ComputerState:
await self._page.wait_for_load_state()
# Even if Playwright reports the page as loaded, it may not be so.
# Add a manual sleep to make sure the page has finished rendering.
time.sleep(0.5)
await asyncio.sleep(0.5)
screenshot_bytes = await self._page.screenshot(type="png", full_page=False)
return ComputerState(screenshot=screenshot_bytes, url=self._page.url)

Expand Down Expand Up @@ -347,4 +347,4 @@ async def highlight_mouse(self, x: int, y: int):
}}
""")
# Wait a bit for the user to see the cursor.
time.sleep(1)
await asyncio.sleep(1)
Loading