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.
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.
#1 Best Overall
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
Rank #2
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.
Record a test with Cypress Studio
- Open the application and start recording the user flow in Cypress Studio.
- Perform the interactions the test should cover. Studio records them and adds Cypress commands to the spec.
- Add assertions manually to express the intended outcome. If Studio AI is enabled, it can recommend assertions based on visible UI changes.
- 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
Rank #3
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
Rank #4
Review AI-generated tests before committing
- 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.
- Choose the authoring method. Use prompts for a known sequence of actions; record in Studio when showing the interaction is simpler.
- 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.
- 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.
- 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.
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.Troubleshoot common problems
- Prompt interpretation does not work: Confirm that Cypress can establish the required secure Cloud connection. Log in to Cloud or use
--recordwith 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.ElementSelectorif appropriate. - You need an option the prompt does not support: Consult the current API reference. Cypress’s guide currently identifies only
forceandtimeoutas 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:
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 →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.
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.




