Skip to content

Commit

Permalink
try to fix sceenshot timeout (#272)
Browse files Browse the repository at this point in the history
  • Loading branch information
LawyZheng authored May 8, 2024
1 parent 7b36e04 commit bce6326
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions skyvern/webeye/browser_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,8 @@ async def take_screenshot(self, full_page: bool = False, file_path: str | None =
LOG.error("BrowserState has no page")
raise MissingBrowserStatePage()
try:
await self.page.wait_for_load_state(timeout=SettingsManager.get_settings().BROWSER_LOADING_TIMEOUT_MS)
LOG.info("Page is fully loaded, agent is about to take screenshots")
if file_path:
return await self.page.screenshot(
path=file_path,
Expand Down

0 comments on commit bce6326

Please sign in to comment.