The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Call cy.screenshot() only after Cypress has performed the action and your test has confirmed that the resulting UI is ready. A reliable pattern is:
cy.get('button').click()
cy.get('[data-cy="success-message"]').should('be.visible')
cy.screenshot('after-action')
The assertion is important: screenshot capture is asynchronous and takes around 100 ms, so the page can change between queuing the command and the actual image capture. Cypress recommends confirming that the page is done changing instead of relying on an arbitrary sleep.
The dependable post-action workflow
- Perform the action. Use commands such as
click(),type(), form submission, or navigation. - Synchronize with application state. Assert on the text, element, URL, request result, or other condition that proves the new state is ready.
- Capture a descriptive screenshot. Queue
cy.screenshot('name')after the check. - Inspect the output. Manual and failure screenshots are written below the configured screenshots folder.
For example, a login test can wait for the dashboard heading rather than guessing how long the request will take:
describe('login', () => {
it('records the dashboard after signing in', () => {
cy.visit('/login')
cy.get('[name="email"]').type('qa@example.com')
cy.get('[name="password"]').type('correct horse battery staple')
cy.get('button[type="submit"]').click()
cy.get('[data-cy="dashboard-heading"]')
.should('be.visible')
.and('contain', 'Dashboard')
cy.screenshot('actions/login/dashboard-ready')
})
})
A filename may contain path segments. Cypress creates those directories beneath the screenshots folder, making names such as actions/login/dashboard-ready useful in larger suites.
#1 Best Overall
- Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
- Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
- Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
- Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
- 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
Choosing what Cypress captures
Viewport capture
Use capture: 'viewport' when the evidence should show only the currently visible browser area:
cy.screenshot('checkout/confirmation-viewport', {
capture: 'viewport'
})
Full-page capture
capture: 'fullPage' captures the application from top to bottom and is the documented default for ordinary screenshots. It is useful for a long result page, but the image can be much taller than the viewport.
cy.screenshot('reports/complete-report', {
capture: 'fullPage'
})
Runner capture
capture: 'runner' includes the browser viewport and the Cypress Command Log. Choose it when the command history is part of the debugging evidence. Automatic failure screenshots are coerced to runner capture.
cy.screenshot('debug/runner-state', { capture: 'runner' })
Element capture
Call .screenshot() on the element when the page is less important than one component:
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Repair Windows errors before they cause bigger problems3Fix the driver behind crashes, sound loss and screen glitchescy.get('.post').first().screenshot('post-card-after-publish')
The command yields the same subject, but Cypress marks it unsafe to chain later commands that rely on that subject. Capture it as the final operation on that chain, or query the element again afterward.
Making the captured state deterministic
Prefer assertions to fixed waits
A fixed cy.wait(1000) can be too short on a slow CI worker and unnecessarily slow on a fast one. Instead, express the condition that means the action is complete:
Rank #2
- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
cy.intercept('POST', '**/api/orders').as('createOrder')
cy.get('[data-cy="place-order"]').click()
cy.wait('@createOrder').its('response.statusCode').should('eq', 201)
cy.get('[data-cy="order-complete"]').should('be.visible')
cy.screenshot('orders/created')
Assertions can check visible text, a spinner disappearing, a URL, a class, or a rendered data value. Cypress retries many assertions until they pass, which is generally more robust than a timer.
Understand Cypress’s capture timing
Screenshot capture is asynchronous and takes approximately 100 ms. The application can therefore advance between the point at which Cypress queues cy.screenshot() and the moment the pixels are collected. Cypress screenshot options default disableTimersAndAnimations to true, preventing JavaScript timers and CSS animations from running while capture occurs. That setting does not wait for your own network or rendering work; your test still needs a meaningful readiness check.
Prepare and restore the document
Use onBeforeScreenshot to hide a transient control, expand a panel, or otherwise prepare the document or element immediately before capture. Use onAfterScreenshot when you need details such as the saved path and image dimensions. Keep preparation narrowly scoped so the image represents a state users could actually see.
cy.screenshot('profile/without-tooltip', {
onBeforeScreenshot($el) {
$el.find('[data-cy="tooltip"]').hide()
},
onAfterScreenshot($el, props) {
cy.log(`Saved ${props.path} (${props.dimensions.width}x${props.dimensions.height})`)
}
})
If you alter the DOM in a callback, restore it when later screenshots or assertions must observe the normal page.
Protecting sensitive content and controlling files
Blackout selectors
The blackout option masks matching elements in viewport captures. Use it for tokens, customer details, or other data that must not enter test artifacts:
cy.screenshot('account/settings', {
capture: 'viewport',
blackout: ['[data-sensitive]', '.credit-card-number']
})
Names and overwriting
Use stable, descriptive names that identify the action and state. Reusing a name does not replace the existing file by default because overwrite defaults to false. Set overwrite: true only when replacement is intentional:
Rank #3
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
cy.screenshot('smoke/home-loaded', { overwrite: true })
Storage location
The default screenshotsFolder is cypress/screenshots. Change it in Cypress configuration when your repository or CI artifact collector expects another directory. Both manual screenshots and failure captures use that folder.
// cypress.config.js
const { defineConfig } = require('cypress')
module.exports = defineConfig({
screenshotsFolder: 'artifacts/cypress-screenshots',
e2e: {
setupNodeEvents(on, config) {
on('after:screenshot', (details) => {
console.log(`Screenshot saved to ${details.path}`)
return details
})
}
}
})
The Node after:screenshot event runs after a screenshot from cy.screenshot() or a failure. It is suitable for copying, annotating, or registering the file for an artifact system.
Manual screenshots, failures, and CI
Manual screenshots work in both cypress open and cypress run. During cypress run, Cypress automatically captures screenshots when a test fails. It does not automatically capture failures during cypress open. Disable failure capture with screenshotOnRunFailure: false in Cypress configuration or screenshot defaults.
module.exports = defineConfig({
screenshotOnRunFailure: false
})
In CI, publish the screenshots directory as a provider artifact so a failed test can be investigated after the job ends. Cypress Cloud can display screenshots from a CI run without extra setup. Keep secrets out of command output and artifacts, and apply blackout before capturing data-bearing screens.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Screenshot versus visual regression testing
cy.screenshot() produces an image; it does not compare that image with a baseline. For visual regression, take the screenshot only after the page is done changing, then use a visual-testing integration that stores a baseline and reports pixel or perceptual differences. Cypress’s visual-testing guidance lists integrations such as Sauce Labs Visual for that comparison workflow. A screenshot used as debugging evidence and a screenshot used as a regression baseline have different naming, retention, and review requirements.
Common problems and fixes
The image shows the old state
Cause: the screenshot was queued before the action’s network or rendering work completed. Fix: wait on the relevant intercepted request and assert on the final element or text before capturing. Do not replace that check with a larger arbitrary delay.
Rank #4
- Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
- Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
- Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
- Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
- Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
An animation or spinner appears
Cause: the application was still changing, or a component uses a transition that is not controlled by the screenshot defaults. Fix: assert that the spinner is gone or the final component is visible; use onBeforeScreenshot for a deliberate, local presentation adjustment.
The whole page is unexpectedly huge
Cause: full-page capture includes content below the fold. Fix: choose capture: 'viewport' for the visible area, or capture a specific element.
Recommended Free Tools
The screenshot cannot be found
Cause: you are looking outside the configured screenshotsFolder, or the run was executed in another working directory. Fix: inspect Cypress configuration and the path reported by after:screenshot; verify that your CI job uploads the same directory.
Repeated runs fail because a file already exists
Cause: the same name is being reused while overwrite remains false. Fix: give each state a distinct name, clean artifacts before the run, or explicitly opt into overwrite: true.
Failure screenshots are missing
Cause: the test is running in interactive mode, where automatic failure capture is not enabled, or configuration disabled it. Fix: run with cypress run and check screenshotOnRunFailure.
Or skip the browser setup
If you need a screenshot service rather than a Cypress test artifact, ScreenshotNeo takes a URL in one request. It accepts cookie and consent banners as a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture. Bot checks, CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers identify the page verdict and billing status.
Free tools Windows power users keep installed
One-click scans. No signup required.
For a one-off capture, follow the API details in the ScreenshotNeo documentation:
Best Value
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
Python:
import requests
r = requests.get(
"https://api.screenshotneo.com/v1/shot",
params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"},
timeout=90,
)
r.raise_for_status()
open("shot.webp", "wb").write(r.content)
Node.js:
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
if (!res.ok) throw new Error(`HTTP ${res.status}`);
const fs = await import('node:fs/promises');
await fs.writeFile('shot.webp', Buffer.from(await res.arrayBuffer()));
ScreenshotNeo also provides an MCP server for Claude, Cursor, and other MCP clients, with take_screenshot, get_page_info, and capture_pdf tools. Its 63 options include full-page and element capture, device and viewport presets, retina scale, PDF controls, custom CSS and JavaScript, clicks, selector waits, network-idle waits, request blocking, headers, cookies, user agents, timezone and geolocation, transparent backgrounds, resizing, selectable cache TTLs, signed links, asynchronous webhooks, bulk capture of up to 100 URLs per call, usage reporting, and an OpenAPI specification. Parameter names used by other screenshot APIs also work, easing migration.
| Plan | Included shots | Price |
|---|---|---|
| Free | 1,000 per month | $0, no card |
| Starter | 3,000 | $5 |
| Growth | 15,000 | $15 |
| Pro | 60,000 | $39 |
| Scale | 250,000 | $99 |
| Business | 1,000,000 | $249 |
Every feature is included on every plan; yearly billing provides two months free. You can start with 1,000 free screenshots a month with no card, then move to paid plans starting at $5 for 3,000 shots.
Frequently Asked Questions
Can I take a screenshot immediately after click()?
Yes, but add an assertion that proves the post-click state is ready before calling cy.screenshot(); the capture itself is asynchronous.
Does Cypress compare screenshots automatically?
No. The command saves an image. Baseline comparison requires a separate visual-testing integration.
Which capture mode should I use for a bug report?
Use runner when the Command Log matters, viewport for the visible UI, fullPage for the complete document, and an element screenshot for one component.
Where are screenshots saved by default?
In cypress/screenshots, unless your Cypress configuration changes screenshotsFolder.
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.

