Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To save a screenshot from a Katalon WebUI test running without a visible Chrome window, select Chrome (Headless) as the execution browser, navigate to the page and wait for the state you want to capture, then call WebUI.takeScreenshot('Screenshots/current-page.png'). The screenshot is taken from the browser session controlled by the test; close that browser after the capture.

Run a Katalon WebUI test in Chrome Headless

Katalon’s headless browser runs the WebUI test without displaying a normal Chrome window. Configure the browser in the project, then use the usual WebUI keywords in the test. The screenshot keyword is useful here because it captures the page in the same browser session that performed the test actions.

Select Chrome (Headless)

  1. In Katalon Studio, open Project > Settings > Desired Capabilities > WebUI.
  2. Open the Chrome/Chrome (headless) capabilities section and configure the options needed for the project. Katalon’s page, “Set up Desired Capabilities for WebUI Testing in Katalon Studio,” was marked last updated February 2026. UI labels can change, so check the documentation for your installed Katalon release if the path differs.
  3. Run the WebUI test using the Chrome (Headless) execution option, or the corresponding configured profile in your Katalon version.

Desired-capability keys are case-sensitive. Katalon documents the headless Chrome settings file in the project’s settings/internal directory as com.kms.katalon.core.webui.chrome (headless).properties. Prefer the Studio settings UI unless you specifically need to inspect or manage that file; avoid assuming that a setting name or file layout is identical across releases.

Take a screenshot after the page reaches the state under test

import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI

WebUI.openBrowser('https://example.com')
// Perform the test actions and wait until the page is in the state to capture.
WebUI.takeScreenshot('Screenshots/current-page.png')
WebUI.closeBrowser()

This is a minimal workflow: open the page, perform the interactions that matter, capture, then close the browser. Put the capture after navigation and after the relevant UI actions—not immediately after opening the URL if the test still needs to sign in, dismiss a dialog, submit a form, or wait for content.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Sale
Philips 24 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 241V8LB
  • CRISP CLARITY: This 23.8″ Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
  • INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
  • THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
  • WORK SEAMLESSLY: This sleek monitor is virtually bezel-free on three sides, so the screen looks even bigger for the viewer. This minimalistic design also allows for seamless multi-monitor setups that enhance your workflow and boost productivity
  • A BETTER READING EXPERIENCE: For busy office workers, EasyRead mode provides a more paper-like experience for when viewing lengthy documents

The example URL and wait comment are illustrative, not a claim that the script has been tested. For an asynchronous page, use the readiness condition that fits the application, such as waiting for a specific element or for an expected state. A screenshot records what was rendered when the capture ran; it does not wait for your application to become visually complete on its own.

Choose a writable output path

Katalon documents the filename as an optional absolute or relative path. If you provide no filename, its example uses the default report location. A relative path is resolved in the execution context, which may not be the directory you expect when running from a CI agent. Choose a stable, writable location that your runner can collect as an artifact, and confirm that the file is present after a run.

Use a distinct, predictable name for each test or run if screenshots must be retained together. Otherwise, successive runs can overwrite the same file. The destination also needs to exist or be creatable by the process running the test; check the runner’s working directory and file permissions when a local run succeeds but CI does not.

Rank #2
Philips 22 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 221V8LB
  • CRISP CLARITY: This 22 inch class (21.5″ viewable) Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
  • 100HZ FAST REFRESH RATE: 100Hz brings your favorite movies and video games to life. Stream, binge, and play effortlessly
  • SMOOTH ACTION WITH ADAPTIVE-SYNC: Adaptive-Sync technology ensures fluid action sequences and rapid response time. Every frame will be rendered smoothly with crystal clarity and without stutter
  • INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
  • THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors

Choose the capture method that matches what you need

A viewport image, full-page image, region crop, element image, and TestOps Vision checkpoint are different outputs. Pick the method by capture scope and intended use rather than treating them as interchangeable.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Need Katalon keyword What to know
Visible browser viewport WebUI.takeScreenshot(fileName) Use for the current browser view. The filename can be an absolute or relative path, and Katalon also documents use without a filename.
Whole page, including content below the viewport WebUI.takeFullPageScreenshot(fileName) Katalon simulates scrolling, captures multiple images, and merges them. It does not recommend this for infinite-scroll pages.
A rectangular region in the viewport WebUI.takeAreaScreenshot(fileName, rect) Pass a Rectangle describing an area within the viewport. Katalon documents this capture as PNG.
A particular page element WebUI.takeElementScreenshot(fileName, to) Pass the Katalon TestObject for the element. Katalon documents this capture as PNG.
Viewport visual-testing checkpoint WebUI.takeScreenshotAsCheckpoint(name) Creates a TestOps Vision checkpoint identified by a checkpoint name, not an ordinary output-path argument.
Full-page visual-testing checkpoint WebUI.takeFullPageScreenshotAsCheckpoint(name) Scrolls and merges page captures for the checkpoint; infinite scrolling is not recommended.

Use a rectangle or TestObject for targeted captures

For an area capture, provide a rectangle that lies within the current viewport. For an element capture, pass the relevant Katalon test object, rather than a CSS selector string in place of that object. The Katalon keyword documentation pages for these methods were marked last updated September 2025. Check the keyword reference for the exact signature and object setup available in your installed release.

Keep full-page captures finite

Full-page capture is useful when the content you need extends below the fold, but it works by scrolling and stitching captures. On an infinite-scroll page, scrolling can continue to load more content, so the capture may be impractical or fail to represent a stable page. If the test is about a particular section, an element or area capture may be a more controlled choice.

Rank #3
Sale
Dell 24 Monitor - SE2426H - 23.8-inch FHD (1920x1080) 144Hz 1ms Display, in-Plane Switching (IPS) Technology, AMD FreeSync™, TÜV 3-Star 2X HDMI, Tilt
  • Clear visuals. Fluid motion: A 144Hz refresh rate and 1ms MPRT deliver smooth, tear‑free motion across work, gaming, and streaming for clearer, more fluid viewing.
  • Eye comfort: TÜV Rheinland 3‑star* certification reduces harmful blue light while preserving stunning color quality without compromise. *TÜV Rheinland 3-star eye comfort certification.
  • Wide viewing angle: Get consistent views across a wide 178° /178° viewing angle.
  • In-Plane Switching (IPS): See excellent color accuracy and consistency across wide viewing angles with In-plane Switching (IPS) technology.
  • Ultra-thin bezels: Maximize your viewing experience with thin bezels.

Make screenshots consistent and useful in CI

  • Stabilize the page before capture. Wait for a meaningful application condition rather than relying only on a fixed delay. Otherwise, the image may show a loading state or partially rendered content.
  • Keep viewport settings consistent. Resolution differences can change wrapping, layout, and the visible content. Katalon’s visual-testing troubleshooting guidance identifies resolution changes and dynamic or scrollable content as potential causes of differences between baseline and current images.
  • Account for dynamic content. Rotating banners, timestamps, animations, and content that changes between visits can produce different screenshots even when the page is functioning as intended. Where appropriate, make the relevant state deterministic or capture only the area under test.
  • Check scroll position and visibility. For a viewport capture, bring the relevant content into view before capturing. Katalon’s guidance notes that dynamic or scrollable elements may need to be made visible and that viewport sizing can behave differently across headless and runner environments.
  • Collect the artifact from the right place. Save to a known runner-accessible path or copy the image into the CI system’s artifact directory. A successful keyword call is only useful for debugging if the resulting file is retained.

These are reliability practices, not guarantees that every headless runner will render identically to a local desktop. Katalon’s page “How to fix Visual Testing failures caused by resolution differences” was marked last updated November 2025; compare the browser, viewport, and execution environment when a baseline differs unexpectedly.

Separate explicit captures from failure-report screenshots

WebUI.takeScreenshot is a capture you place in the test at a specific point. Katalon also documents an automatic screenshot behavior for failed executions, controlled under Project Settings > Execution with the option “Take Screenshot when execution failed.” You can disable that automatic behavior there. Changing it does not remove an explicit screenshot call from test code, and an explicit call does not by itself configure the failure-report behavior.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What Chrome’s own headless screenshot flag does—and does not do

Chrome can also be run independently with the command-line --screenshot flag, which saves screenshot.png in the current working directory. Chrome’s headless documentation gives --window-size=412,892 as an example of setting capture dimensions. This can be useful for a standalone browser capture, but it is not usually the best way to capture a Katalon-controlled test state: the Katalon keyword operates on the browser session your test already uses.

Rank #4
Sale
Samsung 27" Essential S3 (S36GD) Series FHD 1800R Curved Computer Monitor
  • CURVED FOR ENHANCED ENGAGEMENT: An immersive viewing experience with a curved monitor that wraps more closely around your field of vision; It creates a wider view, enhancing depth perception and minimizing peripheral distraction
  • SMOOTH PERFORMANCE FOR SEAMLESS CONTENT: Stay in the action when playing games, watching videos, or working on creative projects; The 100Hz refresh rate reduces lag and motion blur so you don't miss a thing in fast-paced moments¹
  • MORE GAMING POWER: Gain the edge with optimizable game settings; Color and image contrast can be adjusted to see scenes more vividly and spot enemies hiding in the dark; Game Mode adjusts any game to fill the screen so you can view every detail²
  • KEEP IT EASY ON THE EYES: Care for your eyes and stay comfortable, even during long sessions; Advanced eye comfort technology certified by TÜV reduces eye strain by minimizing blue light and reducing irritating screen flicker²
  • INCREASED VERSATILITY: Connect to more; Plug devices straight into your monitor for increased flexibility, making your computing environment even more convenient

For Selenium-managed Chrome, Selenium currently lists --headless=new among common Chrome arguments and states that Chrome and ChromeDriver major versions must match. Do not treat an old headless flag or a manually added argument as timeless. Check compatibility guidance for the Chrome, ChromeDriver, Selenium, and Katalon versions actually installed in the runner before changing browser arguments.

Troubleshooting common screenshot problems

Symptom Likely cause What to check or change
No image appears where expected The path is relative to a different working directory, the destination is not writable, or the CI job does not collect that folder. Use a known absolute path for diagnosis, check runner permissions, and configure artifact collection for the actual output directory.
The image shows a loading screen or missing content The capture ran before asynchronous content or a required interaction completed. Wait for an application-specific element or state before calling the screenshot keyword.
Image differs between local and CI runs Viewport/resolution, browser versions, dynamic page content, or visibility/scroll position differs. Compare execution settings and browser versions, standardize the viewport where supported, and make the target content visible and stable.
Full-page image keeps growing or is unreliable The page uses infinite scrolling or loads new content as the capture scrolls. Use a finite section, element, or viewport capture instead of full-page scrolling.
Headless visual check fails despite a screenshot being saved Capturing an image and verifying image presence are separate operations; Katalon documents WebUI.verifyImagePresent as unsupported in headless browser mode. Do not rely on that keyword as a headless image-comparison check. Choose a supported visual-testing workflow and confirm its requirements for your Katalon version.
Chrome fails to start after changing headless arguments Arguments may not match the installed browser/driver combination or Katalon configuration. Check the versions and compatibility guidance for the installed components, then use the current Katalon capability configuration rather than assuming a legacy flag applies.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

If your goal is a screenshot of a public URL—not the exact authenticated, interacted-with page in a Katalon test—ScreenshotNeo can capture it with one GET request. It is a website screenshot API and MCP server; it does not take over or capture the live browser session controlled by your Katalon test.

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o shot.webp

See the ScreenshotNeo API documentation for request options. The request returns an image or PDF; ScreenshotNeo supports PNG, JPEG, and WebP screenshots. The supplied cURL example saves the response as WebP.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Sale
Sceptre New 22-Inch Gaming Monitor, FHD 1080p, Up to 144Hz, HDMI, DisplayPort, Built-in Speakers, Machine Black (E225W-FW144 Series, 2026)
  • 【INTEGRATED SPEAKERS】Whether you're at work or in the midst of an intense gaming session, our built-in speakers provide rich and seamless audio, all while keeping your desk clutter-free.
  • 【EASY ON THE EYES】 Protect your eyes and enhance your comfort with Blue-Light Shift technology. This feature reduces harmful blue light emissions from your screen, helping to alleviate eye strain during long hours of use and promoting healthier viewing habits.
  • 【WIDEN YOUR PERSPECTIVE】Our sleek minimal bezel design ensures undivided attention. The nearly bezel-free display seamlessly connects in a dual monitor arrangement, delivering an unobstructed view that lets you focus on more at once, completely distraction-free.

For a Python request, with the requests package available:

import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://example.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)

For Node.js with a runtime that provides fetch:

const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://example.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);

Use an API key in place of YOUR_API_KEY. The Node.js example makes the request; add response handling and file writing in your application if you need to save its body as a local file.

  • Cookie banners and consent prompts, newsletter popups, and chat widgets are removed before capture; each cleanup step can be turned off.
  • Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed. The response includes X-Page-Verdict and X-Billed headers.
  • An MCP server provides take_screenshot, get_page_info, and capture_pdf tools for Claude, Cursor, and other MCP clients.
  • The Free plan includes 1,000 shots a month with no card; paid plans start at $5 for 3,000 shots. All listed features are on every plan.

Sign up for ScreenshotNeo’s free plan to get 1,000 screenshots a month with no card.

Frequently Asked Questions

Can a headless Katalon screenshot capture a page after signing in?

Yes, when the test performs the sign-in in its WebUI browser session, place the screenshot call after the authenticated page state has been reached. Avoid retaining screenshots that expose credentials or other sensitive account data.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Does Chrome Headless make a Katalon screenshot a visual assertion?

No. A saved screenshot is an artifact. Treat pass/fail assertions and visual comparison as separate test steps, and confirm that the comparison method you choose is supported by your headless Katalon setup.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.