clean up fullpage screenshot exp (#4102)
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user