clean up fullpage screenshot exp (#4102)

This commit is contained in:
LawyZheng
2025-11-26 14:55:02 +08:00
committed by GitHub
parent 1fff8a2ac6
commit 8d09d9822a
5 changed files with 4 additions and 43 deletions

View File

@@ -240,18 +240,12 @@ class SkyvernFrame:
timeout: float = SettingsManager.get_settings().BROWSER_SCREENSHOT_TIMEOUT_MS,
mode: ScreenshotMode = ScreenshotMode.DETAILED,
scrolling_number: int = SettingsManager.get_settings().MAX_NUM_SCREENSHOTS,
use_playwright_fullpage: bool = False, # TODO: THIS IS ONLY FOR EXPERIMENT. will be removed after experiment.
) -> bytes:
if scrolling_number <= 0:
return await _current_viewpoint_screenshot_helper(
page=page, file_path=file_path, timeout=timeout, mode=mode
)
if use_playwright_fullpage:
return await _current_viewpoint_screenshot_helper(
page=page, file_path=file_path, timeout=timeout, full_page=True
)
if scrolling_number > SettingsManager.get_settings().MAX_NUM_SCREENSHOTS:
LOG.warning(
"scrolling_number is greater than the max number of screenshots, setting it to the max number of screenshots",