Automate browser based workflows with AI
Python aiapiautomationbrowserbrowser-automationcomputergptllmplaywrightpowerautomatepuppeteerpythonrpaseleniumvisionworkflow
add get page video timeout (#1710)
Shuchang Zhengf0b274d31da6
diff --git a/skyvern/webeye/browser_factory.py b/skyvern/webeye/browser_factory.pyindex ae4ff0655..23561ae60 100644--- a/skyvern/webeye/browser_factory.py+++ b/skyvern/webeye/browser_factory.py@@ -480,14 +480,22 @@ class BrowserState:returnif len(self.browser_artifacts.video_artifacts) > index:if self.browser_artifacts.video_artifacts[index].video_path is None:- self.browser_artifacts.video_artifacts[index].video_path = await page.video.path()+ try:+ async with asyncio.timeout(settings.BROWSER_ACTION_TIMEOUT_MS / 1000):+ self.browser_artifacts.video_artifacts[index].video_path = await page.video.path()+ except asyncio.TimeoutError:+ LOG.info("Timeout to get the page video, skip the exception")returntarget_lenght = index + 1self.browser_artifacts.video_artifacts.extend([VideoArtifact()] * (target_lenght - len(self.browser_artifacts.video_artifacts)))- self.browser_artifacts.video_artifacts[index].video_path = await page.video.path()+ try:+ async with asyncio.timeout(settings.BROWSER_ACTION_TIMEOUT_MS / 1000):+ self.browser_artifacts.video_artifacts[index].video_path = await page.video.path()+ except asyncio.TimeoutError:+ LOG.info("Timeout to get the page video, skip the exception")returnasync def get_or_create_page(