Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversOctober 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 Scan×
Skip to content
World desk6 min

How to Write Cypress Tests in Plain English with AI

Cypress can turn plain-English steps into runnable commands with cy.prompt(), or record interactions with Cypress Studio. Learn which workflow fits, what Cloud features require, and how to review generated tests.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

You can write Cypress end-to-end tests in plain English with cy.prompt(): give it clear, single-action steps, and Cypress interprets them, selects elements from the page, generates Cypress commands, and runs them. To build a test by demonstrating a flow instead, use Cypress Studio to record clicks and add assertions. In either case, inspect the resulting code and verify that its assertions protect the behavior you actually care about.

Choose between cy.prompt and Cypress Studio

Workflow How you describe the test Best fit Cloud requirement
cy.prompt() Write natural-language steps. A flow you already understand and can state one action at a time. A secure Cypress Cloud connection is needed to interpret prompts. You can log into Cloud or run with --record and a valid key. It is available on the free Starter plan; paid plans provide higher usage allowances. Cypress documentation
Cypress Studio Interact with the application to record the flow; add assertions yourself. A flow that is quicker to demonstrate than describe. Basic recording and manual assertions work without Cloud. Studio AI assertion recommendations require a Cloud account and linked project. Cypress Studio guide

These are different ways to author a test, not a guarantee that one produces better tests. Cypress describes cy.prompt() as an AI-assisted workflow and Studio as interaction recording, with AI recommendations available as an additional Studio capability. Cypress AI overview

As an Amazon Associate I earn from qualifying purchases.

Write a test with cy.prompt()

Put cy.prompt() inside a Cypress test and pass an array of plain-English steps. This example follows the documented syntax; adapt the page path, labels, and expected result to your application.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
describe('product search and cart', () => {
  it('adds a laptop to the cart', () => {
    cy.prompt([
      'visit /products',
      'search for "laptop" in the search field',
      'click the "Add to Cart" button',
      'verify the cart shows 1 item',
    ])
  })
})

For a visit step, Cypress recommends using an absolute URL. For example, change the first step to visit https://example.com/products and use your own application URL. Check the current cy.prompt() API reference for the supported command surface as it changes.

Make the instructions specific

  • Start each step with an action, such as “visit,” “search,” or “click.”
  • Keep one action in each step instead of combining several operations into one sentence.
  • Name the target clearly using the label or other information a person can identify on the page.
  • Add positional context when it helps distinguish similar controls.
  • Use English: Cypress says prompts are optimized for English and does not guarantee accuracy or support in other languages.

Cypress puts it plainly: “Prompt clarity determines reliability.” Cypress’s prompt-writing guide

Understand what Cypress generates

Cypress interprets the steps, examines the DOM to select targets, generates commands, and executes them. In the Command Log, you can see the natural-language steps alongside their corresponding commands. Use the Code view to inspect and export generated code. Cypress documents both a generate-once approach, where you export code and commit it, and an approach that keeps prompts in the test so Cypress can adapt them to UI changes. Generate tests with cy.prompt

Only force and timeout options are currently supported through natural-language prompting, according to the guide. If your test needs other Cypress behavior, check the API reference and write or edit the appropriate code directly rather than assuming a prompt can express every option.

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.

Record a test with Cypress Studio

  1. Open the application and start recording the user flow in Cypress Studio.
  2. Perform the interactions the test should cover. Studio records them and adds Cypress commands to the spec.
  3. Add assertions manually to express the intended outcome. If Studio AI is enabled, it can recommend assertions based on visible UI changes.
  4. Inspect the recorded commands and selectors, edit anything unclear or fragile, then run the test.

Studio AI recommendations are not a substitute for knowing the product. The feature observes visible UI changes; it does not know your application’s business rules or backend requirements. Review a suggestion before relying on it. Cypress Studio guide

Studio AI compatibility and selector behavior

The current Studio guide requires Cypress 15.11.0 or later for Studio AI. It lists these limits: E2E-only support; no Cucumber-style tests; no recording across multiple origins; and no iframe or Shadow DOM support. These are the guide’s stated limits, so check it again when choosing a Cypress version or designing a flow.

Studio’s documented selector preference, from higher to lower priority, is data-cy, data-test, data-testid, data-qa, name, id, class, tag, attributes, then nth-child. If your project uses a different selector convention, Cypress points to Cypress.ElementSelector for configuring project-specific preferences. Cypress Studio guide

Review AI-generated tests before committing

  1. Start with the protected outcome. State what should remain true for the user, such as a successful login or a cart count changing. This gives you a standard for judging whether the test is useful.
  2. Choose the authoring method. Use prompts for a known sequence of actions; record in Studio when showing the interaction is simpler.
  3. Inspect commands and selectors. Check the Command Log or Studio code panel. Confirm that the test targets the intended controls and that changes in markup will not make its selectors needlessly brittle.
  4. Check assertions against requirements. Make sure assertions verify the product behavior, not just that a click happened or that an incidental visual detail changed. Add or revise assertions if needed.
  5. Run and maintain the spec. Execute the test, fix failures based on the application’s intended behavior, and commit readable code. Cypress tests use familiar Mocha/Chai structure and BDD/TDD assertion styles. Writing and organizing Cypress tests

Generated commands are inspectable, but that does not make a generated test self-validating. The application’s required behavior—not the AI’s choice of steps or assertions—determines whether the test is correct.

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

Cloud access, usage limits, and privacy

cy.prompt() needs a secure Cypress Cloud connection for prompt interpretation. Cypress says prompts are not used to train AI models, and organization-level controls can disable AI features. Review the current Cypress Cloud AI feature information and your organization’s controls before enabling the workflow.

For Studio AI, Cypress Documentation reports the following recommendation limits, accessed 2026; the documentation says limits are subject to change:

Account or capacity Documented Studio AI limit
Free Cloud account 60 recommendations per hour
Paid account or free trial 300 recommendations per hour
Across plans 10 parallel recommendation requests
Anonymous trial Up to 6 recommendations in a browser session before login or project linking is requested

These are Studio AI recommendation limits, not an independent measure of test quality or time saved. Cypress Studio AI documentation

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

Troubleshoot common problems

  • Prompt interpretation does not work: Confirm that Cypress can establish the required secure Cloud connection. Log in to Cloud or use --record with a valid key, as described in the prompt guide.
  • A prompt targets the wrong element: Make the step more specific, name the target by its visible label, split compound instructions into one action per step, and add positional context if controls are similar. Inspect the generated command in the Command Log.
  • The test’s assertion does not prove the feature works: Replace or supplement it with an assertion tied to the behavior your application is required to provide. Studio AI bases recommendations on visible UI changes, not business logic.
  • Studio AI is unavailable or cannot record a flow: Check that Cypress is 15.11.0 or later and that the project is E2E. The current guide also excludes Cucumber-style tests, multi-origin recording, iframes, and Shadow DOM.
  • Studio chooses a fragile selector: Inspect its selector and align it with the project’s convention; configure preferences using Cypress.ElementSelector if appropriate.
  • You need an option the prompt does not support: Consult the current API reference. Cypress’s guide currently identifies only force and timeout as supported through natural-language prompting.

Or skip the browser setup

If what you need is a screenshot of a page—not an interactive Cypress test—ScreenshotNeo offers a one-request screenshot API. Provide a URL to receive an image or PDF:

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

See the ScreenshotNeo API documentation for options and response details. ScreenshotNeo accepts cookie banners and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each step can be turned off. Bot checks and CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, with the outcome reported in response headers. An MCP server provides take_screenshot, get_page_info, and capture_pdf tools for AI agents. The free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000. This captures pages; it does not replace Cypress tests or their assertions. Learn about ScreenshotNeo.

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

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
PC Slower Than It Used to Be?Free scan - under a minute

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.