diff --git a/contributing/samples/multimodal/computer_use/playwright.py b/contributing/samples/multimodal/computer_use/playwright.py index 9b61f5965de..4c9b2779069 100644 --- a/contributing/samples/multimodal/computer_use/playwright.py +++ b/contributing/samples/multimodal/computer_use/playwright.py @@ -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) @@ -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)