October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run ScanOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
Mountain View desk5 min

How to Export Cypress Tests from Google Chrome

Use Chrome DevTools Recorder and the Cypress extension to export a flow as a Cypress script, or convert Recorder JSON files with the CLI. Learn the limits and fixes.

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.

To export a Cypress test from Chrome, record the interaction in Chrome DevTools Recorder, then use the Cypress Chrome Recorder extension’s export menu to convert it into a Cypress script. For a batch of saved Recorder JSON files or an automated workflow, use the @cypress/chrome-recorder command-line tool instead. Treat either output as a starting point: review its selectors and steps, run it in your project, and add assertions for the results your test is meant to verify.

Export one recorded flow from Chrome

  1. Open the site under test. Use a regular web page, not a chrome:// page, and open Chrome DevTools.
  2. Record the flow. Open the Recorder panel, start a recording, perform the actions you want to capture, and stop the recording. Chrome DevTools Recorder is designed to record, replay, debug, and measure user flows. See Chrome DevTools Recorder.
  3. Install the Cypress extension. Install the Cypress-maintained Cypress Chrome Recorder extension from the Chrome Web Store. Chrome’s instructions say to open DevTools in a new tab after adding an extension to see custom Recorder options: Chrome’s Recorder guide.
  4. Export the recording. In Recorder, open the export menu and choose Export as a Cypress Test script (the extension README also labels the action Export as a Cypress Test). Save the generated source file. The extension is maintained by the Cypress Team; its instructions are in the extension repository.
  5. Add it to your Cypress project. For Cypress 10 or newer, use a .cy.js or .cy.ts filename, then place it in the spec directory configured by your project. Review and run the script before relying on it.

What the export gives you—and what it does not

The extension converts recorded actions into Cypress commands; the documentation does not promise that it will add assertions or validate the generated test for your particular application. Check that the selectors identify the intended elements, remove brittle or unnecessary steps, and add assertions for meaningful outcomes—for example, that a confirmation message appears or a URL changes as expected.

Convert Recorder JSON files with the CLI

The npm package @cypress/chrome-recorder converts JSON files exported by Chrome DevTools Recorder. Use the CLI when you want to convert saved recordings in a repeatable workflow or handle several files at once.

Prerequisites and installation

The package documents Chrome 101 or newer as the minimum for exporting Recorder JSON. Double-click and right-click support require Chrome 103 or newer. Install the converter globally:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
npm install -g @cypress/chrome-recorder

Or run it with npx without a global install. In either case, first export the desired flow or flows as Recorder JSON from Chrome.

Convert one or several recordings

  • Interactive mode: npx @cypress/chrome-recorder
  • One recording: npx @cypress/chrome-recorder path/to/recording.json
  • Multiple JSON recordings: npx @cypress/chrome-recorder path/to/recordings/*.json
  • Choose an output directory: append --output=folder-name, for example npx @cypress/chrome-recorder path/to/recording.json --output=generated-tests.

Use paths that match your project and shell. The package documents cypress/integration as its default output directory, with cypress/e2e as a fallback. If neither exists, its README says to create a directory manually or install Cypress in the project. Confirm the output path before adding generated files to version control.

Preview or control conversion

  • --dry performs a dry run.
  • --print prints transformed files.
  • --force bypasses Git safety checks; use it only if that is intentional.

For integration into your own tooling, the package also exposes cypressStringifyChromeRecording for programmatic conversion. See the package README for its documented usage.

Understand the conversion limits

The converter README describes these Recorder step mappings. Exact generated selectors and code can depend on the recording, so inspect the result rather than assuming every flow will produce a maintainable test.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Recorder step Documented Cypress mapping
change cy.get("element").type("text")
click .click()
Right click .rightclick()
doubleClick .dblclick()
hover .trigger()
keyDown cy.type("{key}")
navigate cy.visit("url")
setViewport cy.viewport(width, height)
scroll cy.scrollTo(x, y)

keyUp is specifically listed as not exported in the package documentation. The README also says unsupported step types should produce a CLI warning. Check conversion output and warnings; do not assume an unsupported action was reproduced.

Choose the route that fits the job

Need Better fit Why
Export one flow from Chrome’s interface Recorder panel and Cypress extension Records in the browser and offers a direct export action.
Convert a folder or repeat conversions @cypress/chrome-recorder CLI Accepts individual files or multiple JSON recordings and supports output, dry-run, and print options.
Integrate conversion into another tool Package library API The package exposes cypressStringifyChromeRecording.

Troubleshoot a missing export option or bad output

  • The Cypress export choice is missing: Confirm you are on a web page, not a chrome:// page. After installing the extension, open a new browser tab and open DevTools there. If it is still missing, check whether an administrator policy prevents the extension or its Recorder integration. Follow Chrome’s Recorder troubleshooting guidance.
  • Recorder was opened before the extension’s options appeared: Reopen DevTools in a new tab after installation, then check the Recorder export menu.
  • Using Chrome 104 or 105 and the option still does not appear: Chrome documented an issue when Recorder was the first DevTools panel opened; it was fixed in Chrome 106. Open another DevTools panel first or use a version with the fix. See Chrome’s Recorder guide.
  • The CLI cannot find a recording: Check that the input path points to an exported Recorder JSON file and that the shell expands any wildcard to matching files. Try one explicit file path to isolate the issue.
  • No output directory is available: The documented default is cypress/integration, falling back to cypress/e2e. Create an output folder and pass it with --output=folder-name, or install Cypress in the project as described by the package README.
  • An action is absent or behaves differently in the test: Check CLI warnings and compare the recording with the documented supported mappings. In particular, keyUp is not exported according to the README. Add or rewrite the needed Cypress command yourself.
  • The test runs but does not prove the expected result: Recorded interactions are not a substitute for assertions. Add checks for the application state that matters, then run the spec in your project.
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 the goal is to capture a website image rather than convert a Chrome interaction recording into Cypress code, ScreenshotNeo is a separate website screenshot API and MCP server for developers. One GET request returns an image or PDF; it does not export Cypress tests.

For example, this cURL request captures Stripe as a WebP image. See the ScreenshotNeo API documentation for setup and options.

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

ScreenshotNeo removes cookie/consent banners, newsletter popups, and chat widgets before capture; those steps can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits are not billed, and the response identifies the page verdict and billing status in headers. Its MCP server provides take_screenshot, get_page_info, and capture_pdf for AI agents. The free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 shots.

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

Sign up for ScreenshotNeo’s free plan to try 1,000 screenshots a month with no card.

Frequently Asked Questions

Does exporting from Chrome automatically create a complete Cypress test?

No. The exporter converts recorded actions; inspect the generated code and add assertions for the outcomes your test must verify.

Can I convert several Chrome Recorder exports at once?

Yes. The CLI accepts multiple JSON recording paths, including a shell wildcard such as path/to/recordings/*.json.

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.

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.