Skip to main content

[WebUI] Take Full Page Screenshot With Scroll

Prerequisites

This keyword is available from Katalon Studio version 11.1.2+.

Description​

Captures a full-page screenshot by scrolling the page and stitching multiple viewport captures into one .png image.

Use this keyword when WebUI.takeFullPageScreenshot cannot capture content outside the current viewport (e.g. a page uses overflow: hidden on html or body and renders content inside an inner scrollable container).

Keyword name: takeFullPageScreenshotWithScroll

Parameters​

ParameterParameter TypeRequiredDefaultDescription
fileNameStringNoAuto-generatedRepresents the path to the saved image. The path can be an absolute or relative path. If omitted, Katalon Studio generates a default file name.
scrollDirectionScrollDirectionNoVERTICALDetermines the scroll direction used to capture and stitch screenshots.
flowControlFailureHandlingNoDefault handlingSpecifies the failure handling schema to determine whether execution should continue or stop.

The ScrollDirection enum is imported using com.kms.katalon.core.model.ScrollDirection and supports these values:

  • ScrollDirection.VERTICAL
  • ScrollDirection.HORIZONTAL

Examples​

// 1. All defaults (auto filename, VERTICAL, default failure handling)
WebUI.takeFullPageScreenshotWithScroll()

// 2. Direction only
WebUI.takeFullPageScreenshotWithScroll(ScrollDirection.VERTICAL)
WebUI.takeFullPageScreenshotWithScroll(ScrollDirection.HORIZONTAL)

// 3. Direction + flow control
WebUI.takeFullPageScreenshotWithScroll(ScrollDirection.HORIZONTAL, FailureHandling.CONTINUE_ON_FAILURE)

// 4. Filename only (VERTICAL default)
WebUI.takeFullPageScreenshotWithScroll('output/full.png')

// 5. Filename + direction
WebUI.takeFullPageScreenshotWithScroll('output/full.png', ScrollDirection.VERTICAL)

// 6. Full signature
WebUI.takeFullPageScreenshotWithScroll('output/full.png', ScrollDirection.VERTICAL, FailureHandling.STOP_ON_FAILURE)
Was this page helpful?