fix(reports): log configured timeout value when spinner wait expires

Include SCREENSHOT_LOAD_WAIT / load_wait in the warning message so it
is immediately visible from logs whether the timeout limit was reached.
Also fix stale docstring default value (30 -> 60).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Elizabeth Thompson
2026-05-06 00:35:53 +00:00
committed by Amin Ghadersohi
parent 4e6ab1ceec
commit 8d7ffac945
2 changed files with 8 additions and 3 deletions

View File

@@ -97,7 +97,7 @@ def take_tiled_screenshot(
page: Playwright page object
element_name: CSS class name of the element to screenshot
tile_height: Height of each tile in pixels
load_wait: Seconds to wait for charts to load per tile (default 30)
load_wait: Seconds to wait for charts to load per tile (default 60)
Returns:
Combined screenshot bytes or None if failed
@@ -167,9 +167,11 @@ def take_tiled_screenshot(
)
except PlaywrightTimeout:
logger.warning(
"Timed out waiting for visible spinners to clear on tile %s/%s",
"Timed out waiting for visible spinners to clear on tile %s/%s "
"(load_wait=%ss)",
i + 1,
num_tiles,
load_wait,
)
# Calculate what portion of the element we want to capture for this tile

View File

@@ -315,7 +315,10 @@ class WebDriverPlaywright(WebDriverProxy):
)
except PlaywrightTimeout:
logger.warning(
"Timed out waiting for charts to load at url %s", url
"Timed out waiting for charts to load at url %s "
"(SCREENSHOT_LOAD_WAIT=%ss)",
url,
self._screenshot_load_wait,
)
raise