Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Clear out junk files and repair common Windows errorsFree Scan →Yes. Selenide automatically captures a screenshot when a test fails by default; the documented default folder is build/reports/tests. To capture one at a deliberate point in a test, call Selenide.screenshot("name"). You can change the artifact folder, turn off automatic failure screenshots, save page source separately, or request image data for use in code. The examples below follow the current Selenide Javadoc, identified as version 7.18.2, and label the release-specific MHTML behavior separately.
Does Selenide take screenshots automatically?
Yes. The Selenide screenshot guide says screenshots are captured automatically on test failure. The documented default folder is build/reports/tests. This gives you evidence for a failure without adding a screenshot call to every assertion.
Automatic failure capture is controlled by Configuration.screenshots, which the current Configuration Javadoc lists as enabled by default. You can set it in Java or pass the corresponding system property when starting the test process:
Configuration.screenshots = false;
./gradlew test -Dselenide.screenshots=false
That switch concerns automatic failure screenshots. It does not prevent an explicit named call such as screenshot("checkout-state") from creating its PNG.
Recommended Free Tools
#1 Best Overall
- 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
Where does Selenide save screenshots, and how do I change the folder?
Set Configuration.reportsFolder to the directory where you want Selenide’s report artifacts, or set selenide.reportsFolder as a system property. The guide shows this example:
Configuration.reportsFolder = "test-result/reports";
./gradlew test -Dselenide.reportsFolder=test-result/reports
The folder is a local artifact location, not a guarantee that a CI system will publish or attach the files to its test report. Configure your build and CI artifact publishing separately, and check that the configured directory is included among the paths collected after a run. For remote browser execution, the provider and test environment also affect how files are made available; Selenide’s FAQ lists cloud and remote execution contexts, but does not establish identical artifact retrieval steps for every provider.
How do I take a screenshot at a specific point in a test?
Use the named static API to create a report artifact. The argument is a base filename, without the extension:
Rank #2
- 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
import static com.codeborne.selenide.Selenide.screenshot;
String pngFileName = screenshot("my_file_name");
This creates my_file_name.png. Use a distinct, meaningful name for each capture point, such as before-submit or confirmation-visible, so the artifact identifies the state you intended to inspect. The method returns the generated filename; it is not the PNG image bytes.
For Kotlin, the same static Java API can be called through the Selenide object:
import com.codeborne.selenide.Selenide
val pngFileName = Selenide.screenshot("my_file_name")
Consult the Selenide API Javadoc for the current overloads and element-related methods. The documented screenshot options include whole-page calls and methods for element or iframe-element capture. Do not assume an element capture or a whole-page call performs scroll-and-stitching beyond the behavior documented for that API.
Rank #3
- 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.
How can I get the screenshot back into Java code?
Use screenshot(OutputType) when the next step needs the image as data rather than only as a named report file. The API documents BYTES, BASE64, and FILE representations:
import org.openqa.selenium.OutputType;
import static com.codeborne.selenide.Selenide.screenshot;
byte[] pngBytes = screenshot(OutputType.BYTES);
String pngBase64 = screenshot(OutputType.BASE64);
File pngFile = screenshot(OutputType.FILE);
Choose the representation based on its destination: bytes for code that consumes a byte array, Base64 for a text-based transport or embedding, and a file when an API expects a filesystem object. The method Javadoc says the returned value can be null if the WebDriver does not support taking screenshots. The Screenshots API also cautions that a temporary file is not guaranteed to persist after tests finish. Copy it to a durable destination during the test if you need it later.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Fix the driver behind crashes, sound loss and screen glitches3Clear out junk files and repair common Windows errorsWhat is saved alongside the PNG?
The image and page source are separate artifacts controlled by separate settings. The current Configuration Javadoc lists Configuration.savePageSource as true by default; the source is HTML by default. Set it to false if you do not want page-source capture:
Rank #4
- 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
Configuration.savePageSource = false;
For Chromium, Configuration.savePageSourceWithResources requests an MHTML snapshot containing page resources. Its documented default is false. Selenide’s 7.18.0 release notes dated 2026-08-20 describe using Chrome DevTools Protocol’s Page.captureSnapshot and falling back to plain HTML if the Chromium/CDP capture is unavailable or fails. This is version-specific release information, not a promise that MHTML capture works across browsers.
Configuration.savePageSource = true;
Configuration.savePageSourceWithResources = true;
Page source can help explain what the browser had loaded, while the PNG records its visual appearance. Neither should be treated as a substitute for the other. Source may contain page data that should not be retained or broadly shared, so align artifact storage and access with your test data policies.
Which capture method should I choose?
| Need | Use | Result and consideration |
|---|---|---|
| Evidence when a test fails | Configuration.screenshots |
Automatic failure screenshot; enabled by default in current Configuration Javadoc. |
| Capture an intentional test state | screenshot("name") |
Named PNG artifact; page source behavior is controlled separately. |
| Pass image data to code | screenshot(OutputType.BYTES) or BASE64 |
Returns the requested representation when supported by the WebDriver. |
| Hand a file object to code | screenshot(OutputType.FILE) |
Temporary-file lifetime is not guaranteed beyond test completion. |
| Capture on successful tests or broader test outcomes | JUnit 5 extension or TestNG listener from the screenshot guide | Use the documented integration for the runner and library version in your project. |
| Include page markup or resources | savePageSource or savePageSourceWithResources |
Separate source artifact; Chromium MHTML behavior is described in the 7.18.0 release notes. |
How do I capture screenshots for successful tests or non-Selenide failures?
Automatic Selenide failure capture is not the only documented route. The screenshot guide describes a JUnit 5 ScreenShooterExtension and a TestNG listener for capturing on successful tests or failures such as assertions that do not come from Selenide checks. It also includes a Kotlin extension example. Follow the integration instructions in the guide for your actual test runner and Selenide version rather than assuming one runner’s setup applies to another.
Best Value
- 【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.
This distinction matters when a failure occurs outside a Selenide condition: the test framework integration gives you a runner-level capture point, while an explicit call lets the test author select a particular state. Decide which event should produce evidence, then avoid creating redundant images from multiple hooks unless the extra artifacts are useful.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Troubleshooting missing or unexpected screenshots
- No automatic screenshot appears. Check that
Configuration.screenshotshas not been set to false, directly or through-Dselenide.screenshots=false. Confirm the failure is in the test flow covered by Selenide’s automatic failure handling; use the documented runner extension or listener for broader test outcomes. - The file is not in the expected directory. Check the active value of
Configuration.reportsFolderand theselenide.reportsFoldersystem property. Then inspect the local test output before diagnosing CI: the CI job may not collect or publish that path. - A named screenshot is missing after disabling automatic capture.
Configuration.screenshotscontrols automatic failure screenshots, not the explicit named screenshot call. Ensure the test reaches the call and check the returned filename and report directory. - The returned value is null or no image is produced. The Selenide API documents null when the WebDriver does not support screenshots. Verify the remote or local driver’s screenshot capability and the execution setup.
- The temporary file disappears. A returned
FILEis not promised to outlive test completion. Copy it to a stable artifact location while the test is still running. - The source file is HTML rather than MHTML. MHTML is an opt-in Chromium/CDP path. Check
savePageSourceWithResources; the 7.18.0 release notes say capture falls back to HTML when CDP is unavailable or capture fails. - There is a screenshot but not the page source you expected. PNG capture and source capture are distinct. Check
savePageSourceand, for Chromium resource-inclusive capture,savePageSourceWithResources.
Or skip the browser setup
If you need a screenshot through an HTTP request rather than from a Selenide test session, ScreenshotNeo provides a screenshot API and MCP server. Its one-call cURL example is:
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
See the ScreenshotNeo documentation for API usage. Its capture flow can accept cookie/consent banners and remove more than 60 known consent platforms, newsletter popups, and chat widgets before the shot; these steps can be turned off. Bot checks/CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing, and response headers report the page verdict and billing status. The MCP server provides take_screenshot, get_page_info, and capture_pdf tools for AI agents. The free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 screenshots. This is a separate API workflow, not a replacement for Selenide’s in-test browser state or test-runner integrations.
Sign up for ScreenshotNeo free: 1,000 screenshots a month, no card required.
Sources and version scope
The configuration defaults and current method signatures cited here are from Selenide’s current Javadocs, which identify version 7.18.2. The MHTML/CDP fallback description is specifically from the Selenide 7.18.0 release post dated 2026-08-20. The official documentation does not establish one artifact-publishing setup for every CI platform or identical screenshot behavior for every remote provider, so those steps should be checked against the runner, driver, and CI configuration actually in use.
Frequently Asked Questions
Do named screenshots use a custom image format such as JPEG?
The documented named screenshot call creates a PNG. The cited Selenide API documentation describes returned output types as bytes, Base64, or a temporary file rather than a named-image format selector.
Are screenshots uploaded to my CI test report automatically?
Not necessarily. Selenide writes artifacts to its configured reports folder; your build and CI system must collect and publish that directory.
Quick Recap
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.

