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

For screenshots you capture explicitly, generate a filename-safe timestamp and pass it to cy.screenshot():

const timestamp = new Date().toISOString().replace(/[:.]/g, '-')
cy.screenshot(`checkout-${timestamp}`)

This produces a filename such as checkout-2026-10-03T20-34-05-046Z.png. For automatic failure screenshots, use Cypress’s Node after:screenshot event for centralized post-capture handling; it runs after the file is written, so it is not a filename-template setting. The guidance below reflects the official Cypress documentation available on October 3, 2026; it does not assume a particular Cypress release.

Timestamp an explicit screenshot

The simplest approach is to include a timestamp in the optional name passed to cy.screenshot(). Cypress uses a supplied name instead of the default suite/test name. Cypress documents the command and its naming behavior.

const timestamp = new Date().toISOString().replace(/[:.]/g, '-')
cy.screenshot(`checkout-${timestamp}`)

toISOString() expresses time in UTC and ends in Z. Replacing colons and periods makes the value convenient in filenames while keeping it chronologically sortable. Cypress adds the image extension. The timestamp above is illustrative, not a fixed output.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Sandisk 2TB Extreme Portable SSD, Up to 1050MB/s, USB-C, USB 3.2 Gen 2, IP65 Water and Dust Resistance, Updated Firmware, External Solid State Drive, SDSSDE61-2T00-G25
  • Get NVMe solid state performance with up to 1050MB/s read and 1000MB/s write speeds in a portable, high-capacity drive(1) (Based on internal testing; performance may be lower depending on host device & other factors. 1MB=1,000,000 bytes.)
  • Up to 3-meter drop protection and IP65 water and dust resistance mean this tough drive can take a beating(3) (Previously rated for 2-meter drop protection and IP55 rating. Now qualified for the higher, stated specs.)
  • Use the handy carabiner loop to secure it to your belt loop or backpack for extra peace of mind.
  • Help keep private content private with the included password protection featuring 256‐bit AES hardware encryption.(3)
  • Easily manage files and automatically free up space with the SanDisk Memory Zone app.(5). Non-Operating Temperature -20°C to 85°C

Use a helper when several tests need the same convention

Put the formatting in a small helper so every explicit capture uses the same pattern:

function screenshotWithTimestamp(name) {
  const timestamp = new Date().toISOString().replace(/[:.]/g, '-')
  return cy.screenshot(`${name}-${timestamp}`)
}

// In a Cypress test:
screenshotWithTimestamp('checkout')

This helper is ordinary project code, not a Cypress-specific feature. Cypress also permits a subdirectory in the screenshot name and creates the directory structure:

Rank #2
Sandisk 1TB Portable SSD, Up to 800MB/s Read Speeds, Black (Old Model)
  • Solid state performance with up to 800MB/s read speeds in a portable drive. (Based on internal testing; performance may be lower depending on host device, interface, usage conditions and other factors. 1MB=1,000,000 bytes.)
  • Back up your content and memories on a storage solution that fits seamlessly into your mobile lifestyle.
  • Take it with you on your adventures—up to two-meter drop protection means this durable drive can take a beating. (Based on internal testing.)
  • Secure it to your belt loop or backpack for extra peace of mind thanks to the tough rubber hook.
  • From Sandisk, a brand professional photographers trust to take on assignments.
cy.screenshot(`checkout/${timestamp}`)

Use a slash-separated relative path and avoid assuming that Cypress will use the same complete output path across every run.

Make the name stricter if needed

The first example keeps the ISO T and Z markers. For a stricter filename convention, replace those too:

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.
Rank #3
SSK Portable SSD 500GB External Solid State Hard Drive USB C Up to 1050MB/s
  • Capacity Display Variance: 500GB external ssd often appears as around 465GB on Windows. MacOS can show full 500 GB capacity. This is binary calculation difference and doesn’t affect SSD hard drive actual physical storage
  • 1050 MB/s Speed: Instantly access to your files with blazing-fast 10Gbps external SSD read up to 1050MB/s and write up to 1000MB/s. LED Light indicates USB SSD instant activity
  • Data Security: Solid state drives S.M.A.R.T. health diagnostics​ and adaptive TRIM optimizing data block management ensures consistent write speeds and extends the longevity of the portable SSD
  • USB-C & USB-A Cable: Both cables featuring rapid USB 3.2 Gen2, this USB SSD effortlessly bridges devices, enabling seamless cross-platform file transfers and backup between computers, smartphones, tablets and iPhone
  • Always Fast: No slowdowns for large file transfers. With SLC caching (25% of current available capacity allocated as high-speed cache), this external SSD delivers steady 10Gbps for transfers within the cache capacity
const timestamp = new Date().toISOString().replace(/[:.TZ]/g, '-').replace(/-$/, '')
cy.screenshot(`checkout-${timestamp}`)

A timestamp helps distinguish captures taken at different times, but it is not a guarantee of uniqueness: two captures can share the same timestamp resolution, and clocks can be skewed. If collision-proof uniqueness matters, add a sequence or random suffix as well.

Handle automatic failure screenshots separately

Cypress automatically captures screenshots for test failures during cypress run, not cypress open. Passing a timestamp to individual cy.screenshot() calls does not set a naming template for those automatic captures. For centralized handling after a screenshot has been written, Cypress provides the Node after:screenshot event. See the Node Events overview and Cypress.Screenshot API.

Rank #4
Sale
Seagate 2TB Portable Hard Drive | USB 3.0 (STGX2000400)
  • Easily store and access 2TB to content on the go with the Seagate Portable Drive, a USB external hard drive
  • Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop
  • To get set up, connect the portable hard drive to a computer for automatic recognition no software required
  • This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
  • The available storage capacity may vary.

What the event can and cannot do

The event receives screenshot details including the saved path and dimensions. Cypress also provides an onAfterScreenshot callback for screenshot command options. These are post-capture mechanisms: the filename has already been selected when they run. Use the event to inspect the actual saved path, log or record it, or perform carefully managed post-save work. Cypress does not document a filename-template option in these APIs.

If you need to rename files centrally, consult the event’s supported arguments and return behavior before changing the artifact. Node-side filesystem and path work may be needed, and the modification should preserve Cypress’s screenshot reporting expectations. Prefer the actual path supplied by Cypress over rebuilding a path from a spec name.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Sale
Samsung T7 Portable SSD 1TB Titan Gray, USB 3.2 Gen 2, Up to 1,050MB/s
  • MADE FOR THE MAKERS: Create; Explore; Store; The T7 Portable SSD delivers fast speeds and durable features to back up any endeavor; Build your video editing empire, file your photographs or back up your blogs all in an instant
  • SHARE IDEAS IN A FLASH: Don’t waste a second waiting and spend more time doing; The T7 is embedded with PCIe NVMe technology that brings fast read and write speeds up to 1,050/1,000 MB/s¹, making it almost twice as fast as the T5
  • ALWAYS MAKE THE SAVE: Compact design with massive capacity; With capacities up to 4TB, save exactly what you need to your drive – from large working files to game data and everything in between
  • ADAPTS TO EVERY NEED: Whether using a PC or mobile phone, count on the T7 for extensive compatibility²; It’s a true team player when it comes to heavy-duty application usage or file-saving
  • HI RESOLUTION VIDEO RECORDING: Record Ultra High Resolution (4K 60fs) videos directly onto the T7 Portable SSD with your favorite camera or mobile devices; Supports iPhone 15 Pro Res 4K at 60fps video and more³

Know where Cypress stores artifacts

The default screenshot directory is cypress/screenshots. Cypress derives screenshot paths from the spec’s location and the common ancestor of the specs selected for a run, so folder paths can change when the selected spec set changes. Cypress explains screenshot and video capture, and its test organization guide describes spec organization.

By default, Cypress clears the screenshots folder before cypress run. Set trashAssetsBeforeRuns: false in Cypress configuration if you need to retain existing assets between runs; check the configuration reference for the applicable configuration format and context.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Account for Cypress suffixes and retries

Cypress can append suffixes for duplicate names, failures, and retries. A timestamp reduces the chance that separately named captures collide, but it does not override Cypress’s suffix rules. Test retries can produce multiple artifacts for a test; see the test retries guide. When consuming files downstream, treat the path reported by Cypress as authoritative rather than guessing a filename from the timestamp.

Troubleshooting

  • The filename has no timestamp. Confirm that the timestamp is included in the argument to the particular cy.screenshot() call. Automatic failure screenshots are separate; handle them through the Node event route if centralized post-capture processing is required.
  • The timestamped call does not affect a failure artifact. A manually named screenshot and an automatic failure screenshot are different capture paths. Use after:screenshot to inspect automatic captures after they have been written.
  • The output folder or path changes between runs. Cypress derives paths from spec location and the common ancestor of selected specs. Use the event-provided saved path instead of reconstructing it.
  • Existing screenshots disappear after a run. Cypress clears the screenshots folder before cypress run by default. Configure trashAssetsBeforeRuns: false if that cleanup is not wanted.
  • Files still have extra suffixes. Duplicate, failure, or retry handling can add suffixes. Do not treat your timestamp as a replacement for Cypress’s own naming behavior.
  • Two captures still collide. A clock timestamp alone cannot guarantee uniqueness at every capture frequency or with a skewed clock. Add a sequence or random component if uniqueness is a strict requirement.

Or skip the browser setup

If your goal is to capture a website from an external service rather than from a Cypress test, ScreenshotNeo provides a screenshot API and MCP server. One GET request can return a PNG, JPEG, WebP, or PDF. Its API documentation covers the request options.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
  • Cookie/consent banners are accepted and removed, along with supported newsletter popups and chat widgets, before the shot; each step can be turned off.
  • Bot checks/CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed. Response headers indicate the page verdict and billing status.
  • An MCP server lets AI agents use screenshot tools, including Claude, Cursor, and other MCP clients.
  • The free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000 screenshots.

Sign up for free: 1,000 screenshots a month, no card required.

Quick Recap

Bestseller No. 2
Sandisk 1TB Portable SSD, Up to 800MB/s Read Speeds, Black (Old Model)
Sandisk 1TB Portable SSD, Up to 800MB/s Read Speeds, Black (Old Model)
From Sandisk, a brand professional photographers trust to take on assignments.
$188.90
SaleBestseller No. 4
Seagate 2TB Portable Hard Drive | USB 3.0 (STGX2000400)
Seagate 2TB Portable Hard Drive | USB 3.0 (STGX2000400)
This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable; The available storage capacity may vary.
$119.99

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.