fix backbone connection (#257)

Co-authored-by: Shuchang Zheng <wintonzheng0325@gmail.com>
This commit is contained in:
Kerem Yilmaz
2024-05-04 19:40:29 -07:00
committed by GitHub
parent e8a46d2a1a
commit b26e2c9699
2 changed files with 2 additions and 1 deletions

View File

@@ -14,6 +14,7 @@ class Settings(BaseSettings):
HAR_PATH: str | None = "./har"
BROWSER_ACTION_TIMEOUT_MS: int = 5000
BROWSER_SCREENSHOT_TIMEOUT_MS: int = 10000
BROWSER_LOADING_TIMEOUT_MS: int = 12000
MAX_STEPS_PER_RUN: int = 75
MAX_NUM_SCREENSHOTS: int = 10
# Ratio should be between 0 and 1.

View File

@@ -178,7 +178,7 @@ class BrowserState:
if url:
LOG.info(f"Navigating page to {url} and waiting for 3 seconds")
try:
await self.page.goto(url)
await self.page.goto(url, timeout=settings.BROWSER_LOADING_TIMEOUT_MS)
await asyncio.sleep(3)
except Error as playright_error:
LOG.exception(f"Error while navigating to url: {str(playright_error)}")