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

When GitHub Actions reports that a Cypress screenshot path does not exist, the usual problem is not image capture itself. The workflow is looking in a different location from the one Cypress used. Check the active screenshotsFolder, account for the spec-derived directory and any nested name, then use Cypress’s runtime-reported path. If another job needs the image, upload it from the Cypress job and download it into a known directory.

What the error actually means

A “path does not exist” failure can occur at two different points:

  • Cypress failed while saving a screenshot. This concerns the browser run, screenshot options, or the configured destination.
  • A later command cannot find a screenshot Cypress already created. This concerns an incorrect path, working directory, cleanup, or transfer between jobs.

Separate those cases first. A shell command such as find, an artifact action, or a publishing step can fail even though Cypress successfully wrote the file elsewhere.

How Cypress chooses the screenshot path

Start with the configured screenshots folder

Cypress stores screenshots in cypress/screenshots by default. The screenshotsFolder configuration option can change that destination. Check the configuration loaded by the CI command, including any environment-specific configuration or command-line overrides.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
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
import { defineConfig } from 'cypress'

export default defineConfig({
  screenshotsFolder: 'cypress/screenshots',
  e2e: {
    setupNodeEvents(on, config) {
      return config
    }
  }
})

If your project uses CommonJS, the same option belongs in the object exported by cypress.config.js. Do not assume the repository root is the active working directory; a workflow-level or job-level working-directory changes how a relative folder is resolved.

Automatic failure screenshots require cypress run

Failure screenshots are enabled by default during cypress run. If the run uses screenshotOnRunFailure: false, Cypress will not create an automatic image after a failed test. Automatic failure screenshots are not the same behavior as an interactive cypress open session.

import { defineConfig } from 'cypress'

export default defineConfig({
  screenshotOnRunFailure: true
})

A manually requested cy.screenshot() is independent of that failure setting, but it still uses the configured screenshots folder and Cypress’s spec-based directory rules.

The spec directory is part of the path

A screenshot name is not simply a repository-relative filename. Cypress places the image below the screenshots folder and a directory derived from the spec path. It removes common ancestor segments shared by the specs selected for that run. Consequently, changing a matrix entry, a --spec argument, or a glob can change the intermediate directory even when the test file itself has not moved.

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

For example, a run selecting several specs may strip their shared cypress/e2e ancestor, while a run selecting one narrower path can produce a different relative directory. A name containing a slash adds another nested directory:

cy.screenshot('checkout/payment-card')

That call creates a checkout/payment-card path beneath the spec-derived directory; it does not place the file at an arbitrary path from the repository root.

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

Cypress clears old assets by default

trashAssetsBeforeRuns defaults to true, so Cypress clears the screenshots folder before a run. An image left by an earlier attempt cannot be used as proof that the current run produced the expected file. Turning cleanup off is not a path correction: it can preserve stale screenshots and conceal the real output location.

A diagnostic sequence that works in CI

1. Inspect the command and configuration

  1. Record whether the failing step runs cypress run, a manual cy.screenshot(), or a later shell/action command.
  2. Find the effective screenshotsFolder and note whether it is relative to a custom working directory.
  3. Check screenshotOnRunFailure if the workflow expects an image created by a failed test.
  4. Check trashAssetsBeforeRuns so you know whether files were deliberately removed at the start of the run.

Do this in the configuration used by the failing CI command, not only in a local configuration file. A different config file or --config value can change the destination.

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.

2. Log the path Cypress resolved

The least brittle fix is to consume the path Cypress reports instead of reconstructing it. The after:screenshot Node event receives screenshot details, including the path, and can log or process the file:

import { defineConfig } from 'cypress'

export default defineConfig({
  e2e: {
    setupNodeEvents(on, config) {
      on('after:screenshot', (details) => {
        console.log(`Cypress screenshot: ${details.path}`)
        console.log(`Spec: ${details.specName || 'unknown'}`)
        return details
      })
      return config
    }
  }
})

For a named screenshot, use the post-screenshot callback available on cy.screenshot() when you need the path at test level. Persist the callback’s resolved path through a task or log it, rather than guessing the spec directory. Keep the diagnostic output temporary or concise once the workflow is fixed.

3. List the producing job’s filesystem

Add a listing immediately after Cypress and before any upload or publish action:

- name: Run Cypress
  run: npx cypress run

- name: Show generated screenshots
  if: always()
  run: |
    pwd
    find . -type f ( -name '*.png' -o -name '*.jpg' -o -name '*.jpeg' -o -name '*.webp' ) -print
    find cypress -maxdepth 5 -type d -print 2>/dev/null || true

The output answers two different questions: whether Cypress created an image at all, and whether the next command is using the correct repository-relative path. If your configured folder is not cypress/screenshots, replace the final find target or search from the actual working directory.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
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.

4. Compare every workflow boundary

Compare the logged absolute or repository-relative path with the path consumed by the next step. Check:

  • the job and step working-directory;
  • the configured screenshots folder;
  • the spec-derived directory;
  • slashes in the screenshot name;
  • the artifact path supplied to upload or download actions.

A same-job step shares the job workspace. A separate GitHub Actions job does not automatically receive files produced by an earlier job, even when the jobs run in the same workflow.

Move screenshots between GitHub Actions jobs correctly

Upload from the Cypress job

Upload the directory that the producing job actually contains. Use if: always() when you want failure screenshots preserved after a failed test command:

jobs:
  cypress:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Install dependencies
        run: npm ci
      - name: Run Cypress
        run: npx cypress run
      - name: Upload Cypress screenshots
        if: always()
        uses: actions/upload-artifact@v4
        with:
          name: cypress-screenshots
          path: cypress/screenshots

If screenshotsFolder is customized, change path to that folder. If your job runs from a subdirectory, make the path relative to that job’s working directory or use the resolved path printed by Cypress.

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

Download into the consumer job

Match the artifact name exactly and choose a destination that the consumer’s later commands use:

jobs:
  publish:
    needs: cypress
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Download Cypress screenshots
        uses: actions/download-artifact@v4
        with:
          name: cypress-screenshots
          path: cypress/screenshots
      - name: List downloaded files
        run: find cypress/screenshots -type f -print

Do not upload cypress/screenshots and then look for a file under a guessed spec path in the next job. Download the artifact, list its contents, and pass the actual location to the publishing command.

Rank #4
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

Common symptoms and precise fixes

Symptom Likely cause Fix
cypress/screenshots/... is absent The folder was customized or the command ran from another directory. Read the effective screenshotsFolder, print pwd, and use the path relative to the active working directory.
A failed test produced no image The run was not cypress run, or screenshotOnRunFailure is disabled. Use the headless run for automatic failure captures or call cy.screenshot() explicitly.
The folder exists but the expected filename does not The spec-derived directory or a nested screenshot name was omitted. Use the after:screenshot path and include every directory component.
The path changes when the matrix changes Common-ancestor stripping depends on the selected spec set. Stop hard-coding the intermediate directory; consume the runtime path or upload the whole screenshots folder.
An earlier image disappeared Cypress cleared assets before the current run. Inspect the current run’s output; do not rely on stale files. Keep cleanup enabled unless you have a separate retention design.
A later job cannot find a file visible in the Cypress job Job workspaces are isolated. Upload an artifact in the producer, download the same artifact name in the consumer, and verify both paths.
A named screenshot appears in an unexpected subfolder The name contains a slash. Include that nested path, or use a name without slashes if a flat directory is required.

Make the workflow resilient

Prefer discovery over reconstruction

Use Cypress’s callback or Node event to obtain the path generated for the current run. This remains valid when specs are added, removed, or selected by a matrix. Uploading the complete screenshots directory is also less fragile than naming one guessed file.

Keep producer and consumer contracts explicit

Give the artifact a stable name, document its destination, and make the consumer list files before publishing them. If a test fails, retain the artifact with if: always(); otherwise a failed command can prevent the evidence from being uploaded.

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.

Account for size and timing

Full-page or high-resolution images can make artifact upload slower. Restrict uploads to the configured screenshots directory rather than the entire workspace, and avoid collecting unrelated build output. A listing step adds little overhead and is valuable while diagnosing a failure; remove verbose recursive logs after the path contract is stable.

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 clean website image rather than a Cypress test artifact, ScreenshotNeo provides a single GET request. Its cleanup steps accept cookie or consent banners and remove more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each step can be disabled. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and the response identifies the page verdict and billing status in X-Page-Verdict and X-Billed headers.

The API supports PNG, JPEG, WebP, and PDF output. Options include full-page capture with lazy images loaded, CSS-selector element capture, dark mode, device presets or custom viewports, retina scale, PDF paper and page settings, custom CSS and JavaScript, clicks, waits, request blocking, headers, cookies, user agents, authorization, timezone, geolocation, transparent backgrounds, resizing, chosen cache TTLs, signed links, asynchronous jobs with signed webhooks, bulk capture of up to 100 URLs per call, a usage API, and an OpenAPI specification. An MCP server exposes take_screenshot, get_page_info, and capture_pdf to Claude, Cursor, and other MCP clients.

See the ScreenshotNeo API documentation for request options. The following calls are runnable; replace the URL and key with your values.

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

cURL

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)
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}`);

Every feature is included on every plan: 1,000 screenshots per month are free with no card; paid plans start at $5 for 3,000 screenshots. Create a free ScreenshotNeo account when you want API or MCP captures without maintaining a browser setup.

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.

FAQ

Should I disable trashAssetsBeforeRuns to preserve evidence?

No. Preserve evidence with an artifact upload that runs even after test failure. Disabling cleanup can make an old screenshot look like output from the current run.

Can a local path check prove the GitHub Actions path is correct?

No. The runner’s working directory, selected specs, configuration, and job isolation all affect the CI result. Verify the path in the failing job itself.

What is the safest single value to pass to a publishing step?

The path emitted by Cypress’s screenshot callback or after:screenshot event for that run. It reflects the actual spec-derived directory instead of a reconstructed guess.

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

Frequently Asked Questions

Should I disable trashAssetsBeforeRuns to preserve evidence?

No. Preserve evidence with an artifact upload that runs even after test failure. Disabling cleanup can make an old screenshot look like output from the current run.

Can a local path check prove the GitHub Actions path is correct?

No. The runner’s working directory, selected specs, configuration, and job isolation all affect the CI result. Verify the path in the failing job itself.

What is the safest single value to pass to a publishing step?

The path emitted by Cypress’s screenshot callback or after:screenshot event for that run. It reflects the actual spec-derived directory instead of a reconstructed guess.

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.

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