October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk5 min

Cypress Screenshot Testing vs. Selenium Screenshots for Website QA

Cypress integrates screenshots into its runner and captures failures in cypress run; Selenium offers page and element capture. Neither capture API alone provides visual regression comparison.

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.

Both Cypress and Selenium can capture screenshots during browser tests, but neither screenshot command alone is visual regression testing. Cypress integrates capture into its test runner and automatically saves failure screenshots during cypress run. Selenium WebDriver provides commands to capture the current browsing context or an element. To detect visual changes, either setup also needs a baseline, an image-comparison step, and a way to review and approve changes.

What each tool does with screenshots

QA need Cypress Selenium WebDriver
Capture a page cy.screenshot() captures the application under test. WebDriver can capture the current browsing context; the official documentation describes the returned image data as Base64-encoded.
Capture one element The screenshot API supports capturing the application and offers screenshot behavior options. WebDriver documents element screenshot methods.
Failure screenshots During cypress run, Cypress automatically captures a screenshot when a test fails. This is not automatic in cypress open. The documented screenshot methods are explicit capture commands. Whether a test failure triggers one depends on the surrounding framework or project code.
Default screenshot location cypress/screenshots; Cypress lets you configure the screenshots folder. The cited WebDriver documentation establishes screenshot methods, not a default artifact-folder policy.
Image comparison and baseline review Not included in the built-in screenshot command; add a plugin or integration. The screenshot methods capture images; add a comparison and review workflow separately.

How to capture screenshots with Cypress

Use cy.screenshot() in a Cypress test when you want an image at a specific point in the test. Cypress also saves screenshots for failures during cypress run, making it useful when the immediate goal is diagnosing failed CI tests rather than asserting that a page looks unchanged.

As an Amazon Associate I earn from qualifying purchases.

describe('account page', () => {
  it('loads the account screen', () => {
    cy.visit('/account');
    cy.get('[data-testid="account-title"]').should('be.visible');
    cy.screenshot('account-page');
  });
});

When a test fails in cypress run, look in cypress/screenshots by default. Change the screenshots folder through Cypress configuration if your artifact collection expects a different path. A call to cy.screenshot() is still only capture: it does not fail the test because pixels differ from a prior run.

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

How to capture screenshots with Selenium

Selenium WebDriver exposes screenshot operations through its language bindings. The official documentation includes examples for Java, Python, C#, Ruby, JavaScript, and Kotlin. The following Python example captures the current page using Selenium’s WebDriver API:

#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
from selenium import webdriver

options = webdriver.ChromeOptions()
options.add_argument("--headless=new")

driver = webdriver.Chrome(options=options)
try:
    driver.get("https://example.com")
    driver.save_screenshot("page.png")
finally:
    driver.quit()

Use the element screenshot method when the test should save a particular component instead of the full browsing context. In Python, for example:

element = driver.find_element("css selector", "main")
element.screenshot("main.png")

These examples save artifacts; they do not define failure handling, baseline storage, or visual assertions. Add those pieces through your test framework and chosen comparison workflow. Consult the Selenium WebDriver documentation for the binding-specific screenshot API and current behavior.

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

Capture is not visual regression testing

A screenshot becomes part of visual regression testing only when the workflow compares it with an approved reference and handles differences deliberately. Cypress states that its built-in screenshot command does not perform image comparison. The same distinction applies to Selenium’s capture methods: an image is an input to comparison, not a verdict.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Capture: choose a page or element, and save the image from a test run.
  2. Compare: compare that image with an approved baseline using a visual-testing plugin or service.
  3. Review: inspect differences, decide whether each is a defect or an intentional design change, and approve a new baseline when appropriate.

Cypress documents both local/CI comparison plugins and hosted integrations, including Happo, LambdaTest SmartUI, Percy (BrowserStack), Sauce Labs Visual, SmartBear VisualTest, and Wopee.io. These are examples in Cypress’s integration guide, not an independent assessment of their current feature sets, prices, or service terms. See Cypress visual testing documentation for its explanation of the workflow and listed integrations.

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 repeatable enough to compare

Pixel differences are useful only when the test controls avoidable variation. Cypress recommends generating and comparing screenshots in the same environment with a fixed viewport. Apply the same discipline to a Selenium-based workflow.

  • Use the same browser and environment for baseline creation and later runs.
  • Set a fixed viewport rather than relying on a machine’s default window size.
  • Stabilize test data and page state before capture; changing content can create differences unrelated to a code regression.
  • Decide how the selected comparison tool should handle dynamic regions. Cypress’s guide describes capabilities such as ignoring regions for some integrations; verify the behavior in the tool you choose.
  • Review diffs before updating a baseline, so an actual regression is not accepted as the new expected appearance.

These controls improve comparability, but they do not guarantee identical images in every run. The cited documentation establishes workflow guidance, not a universal determinism guarantee.

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

Which should you choose for website QA?

Choose Cypress when

  • Your existing browser tests already use Cypress and you want capture integrated into those tests.
  • You want Cypress to save failure screenshots automatically during cypress run.
  • You are prepared to add a separate visual comparison tool if you need baselines and diff review.

Choose Selenium when

  • Your project already uses Selenium WebDriver and its language bindings.
  • You need to capture the current page or a specific element and will implement artifact handling and comparison in your existing test setup.
  • You need to decide how your framework handles screenshots on failures; the screenshot API alone does not establish automatic failure capture.

There is no basis in the documented API differences to claim that one universally produces more accurate screenshots or runs faster. The practical choice is usually the framework that fits the test suite you already maintain; visual regression still requires an additional comparison and review layer.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
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 you need a screenshot outside a Cypress or Selenium test, ScreenshotNeo is a screenshot API and MCP server for developers. A single GET request returns an image or PDF. For example, save a WebP screenshot with cURL:

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.
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 and response details. ScreenshotNeo accepts cookie or consent banners and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each of those steps can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and responses identify the page verdict and billing status in headers. Its MCP server gives AI agents tools to take screenshots, get page information, and capture PDFs. The Free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 shots. This is an alternative for capturing pages, not a substitute for comparing images against a visual-regression baseline. Sign up for 1,000 free screenshots a month with no card.

Frequently Asked Questions

Does Cypress automatically take a screenshot when a test fails?

Yes, during cypress run; Cypress does not do this automatically in cypress open.

Do Cypress or Selenium screenshots prove that a page has not changed visually?

No. Capture saves an image; visual regression requires a baseline comparison and a review or approval step.

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

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

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

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.