---
id: app/guides/cypress-studio
title: Cypress Studio AI
description: >-
  Record interactions, get AI-powered assertion recommendations, and build more
  complete E2E tests without writing every line by hand.
section: app
source_path: docs/app/guides/cypress-studio.mdx
version: 6a908a532b1fca4ed18538a4c1c5a9bc7f24f403
updated_at: '2026-05-01T19:25:18.656Z'
---
# Cypress Studio AI

**Record, assert, and verify - with AI doing the heavy lifting.**

Cypress Studio lets you generate and extend E2E tests by recording real interactions in your app. Studio AI adds a layer on top: as you record, it watches what changes in the UI and recommends assertions automatically. You review them, keep what fits, and save.

The result is faster test authoring and fewer gaps in coverage without guessing what to assert after every click.

**Cypress Studio alone does not require a Cloud account or AI to be useful.** You can record interactions and add assertions manually at any time. AI-powered recommendations are an opt-in layer that requires a Cypress Cloud connection.

## Studio vs. Studio AI

| Feature | Studio (no Cloud) | Studio AI (Cloud required) |
| --- | --- | --- |
| Record interactions | ✅ | ✅ |
| Manually add assertions | ✅ | ✅ |
| Edit test code inline | ✅ | ✅ |
| Undo / redo / reset | ✅ | ✅ |
| **AI assertion recommendations** | \- | ✅ |
| **Review DOM snapshots for AI recommendations** | \- | ✅ |

If you don't have a Cloud account, Studio still works for recording interactions and manually adding assertions. The AI recommendations panel will ask you to login and link your project when you open it.

## Get started

Studio requires **internet access** and **sourcemaps**. See [enable sourcemaps](#Enable-sourcemaps) for sourcemap setup. AI features additionally require a Cypress Cloud account and linked project.

### Connect to Cypress Cloud

**Studio AI** requires a Cypress Cloud account and a linked project. If you haven't set this up, the Studio panel will walk you through it.

[Create a free account ➜](https://cloud.cypress.io/signup)

Free accounts include a two-week trial of all paid features, including higher AI usage limits.

To link your project to Cypress Cloud, see [Set up your project to record](/llm/markdown/cloud/get-started/setup.md#Set-up-a-project-to-record).

### Enable sourcemaps

Studio needs sourcemaps to load your test code accurately. Sourcemaps are enabled by default in most Cypress configurations. If Studio opens your test correctly when you click **Edit in Studio**, you're already set.

If sourcemaps are missing, Studio displays an error. See [how to enable sourcemaps](/llm/markdown/api/node-events/preprocessors-api.md#Source-maps) to resolve it.

## Open Studio

You can start Studio three ways:

*   **New test:** Click **New Test** on any spec or suite in the Cypress App.
*   **Existing test:** Hover over a test in the Command Log and click **Edit in Studio**.
*   **Studio panel:** Click **Studio Beta** in the header panel directly.

### Edit in Studio button on a Cypress test

### Clicking 'New Test' on a suite

## Create a new test

1.  Click **New Test** on the spec file or suite you want to work in.
2.  Give the test a descriptive name. This is used by Studio AI to help generate more meaningful assertions.
3.  When prompted, enter the URL you want Studio to visit. This writes a `cy.visit()` command to your test file, which Studio uses to load the app before recording can begin.

Studio creates the test definition and opens the Studio panel and is ready to record interactions.

## Extend an existing test

Studio runs your test up to the last command, then puts you in **recording mode** from that point forward. New recorded actions and assertions are always appended to the end of your test.

**To extend a test:**

1.  Run the spec in the Cypress App.
2.  Hover over the test in the Command Log.
3.  Click **Edit in Studio**.

You can then edit any portion of the test code directly in the Studio code panel. There's no need to switch to your IDE.

## Record interactions

Once Studio is open, interact with your app normally. Studio translates each action into a Cypress command in real time and adds it to your spec file. You can see the commands as they are being written in the Studio code panel.

**Supported actions:**

*   [`.click()`](/llm/markdown/api/commands/click.md)
*   [`.type()`](/llm/markdown/api/commands/type.md)
*   [`.check()`](/llm/markdown/api/commands/check.md)
*   [`.uncheck()`](/llm/markdown/api/commands/uncheck.md)
*   [`.select()`](/llm/markdown/api/commands/select.md)

**Need to inspect something while recording mode is active?** You can pause recording by clicking the **Record** button and open DevTools to inspect elements or debug behavior, then click the Record button again to resume.

### How selectors are chosen for commands

Studio automatically picks a unique selector for each element you interact with, add an assertion to, or for AI smart recommendations. We use a priority strategy designed to optimize for uniqueness, readability, and performance.

### Default Selector Priority

1.  `data-cy`
2.  `data-test`
3.  `data-testid`
4.  `data-qa`
5.  `name`
6.  `id`
7.  `class`
8.  `tag`
9.  `attributes`
10.  `nth-child`

To prioritize selectors that make more sense for your project for Studio and `cy.prompt()`, use the [`Cypress.ElementSelector`](/llm/markdown/api/cypress-api/element-selector-api.md) API.

## Add assertions manually

Right-click any element in your app to see available assertions based on that element's current state - visible, hidden, a specific value, a CSS class, and more. Assertions are always appended to the end of your test.

## AI smart recommendations ✨

As you record, Studio AI observes changes in the DOM between interactions and suggests meaningful assertions for each step based on what changed.

### How recommendations work

For each recorded interaction:

1.  A **thinking indicator** appears in the Studio panel while Studio AI generates a recommendation.
2.  If a recommendation is available, Studio AI displays an **AI-generated comment** explaining what the assertion validates. The actual test code is generated and collapsed by default - expand it to review.
3.  If no meaningful DOM changes were detected or another issue is preventing a recommendation from being generated, Studio AI displays an icon indicating this and the reason (for example, no state difference was found).

Recommendations are added to your test code immediately when generated. This means you can **save or run the test with AI recommendations included** before deciding to keep them. This is intentional: it lets you verify whether a recommended assertion actually passes against your app before committing it.

### Accept, reject, or edit

Each recommendation includes **Accept** and **Reject (x)** buttons that remain visible even after saving. You can:

*   Accept recommendations one at a time or use **Accept all** to approve the full set.
*   Reject recommendations individually or use **Reject all** to dismiss them.
*   Undo, redo, or reset any changes in the Studio code panel (including acceptances and rejections).

### Understand what was detected

Hover over any recommendation to see:

*   The exact state of the DOM at the time the assertion was generated. You'll see a _before_ and _after_ snapshot of the DOM for each recommendation that represents the state of the DOM before and after the interaction that triggered the recommendation.
*   The specific element being asserted on will be highlighted in the DOM.
*   You can save the code to verify the assertion passes before accepting or rejecting it.

This gives you enough context to decide whether the assertion reflects something meaningful to your team and not just something that changed.

### Failing tests

If a test is failing, AI recommendations and recording are both disabled. This is intentional - you don't want to take actions or add assertions when the test is already in a bad state.

**To recover from a failing test:**

1.  Edit the failing code directly in the Studio panel or in your IDE.
2.  Click **Save** to write the changes to your spec file.

When a line causes a test failure, that line is highlighted in the Studio code panel so you can locate it immediately for easier debugging.

### Types of assertions Studio AI recommends

Studio AI suggests assertions based on visible UI changes after each interaction, including:

*   Visibility (element visible or hidden)
*   Element existence
*   Text content
*   Length (number of elements)
*   Form input values, selections, and states
*   Element attributes including CSS classes and aria attributes
*   Current URL and page title

Studio AI does not have access to your application code, business logic, or backend rules. Its recommendations reflect what actually changed in the visible UI.

## Sensitive data handling

When Studio AI reads your app's DOM to generate recommendations, values from certain field types are automatically excluded before anything is sent to the AI model:

*   Password fields (`input[type=password]`)
*   Credit card fields using standard autocomplete attributes (card name, card number, expiry date, security code, card type)
*   Hidden inputs (`input[type=hidden]`)

The structure and context of these fields are still used to generate assertions. Only the values are excluded.

For full details on how Cypress handles data and AI model security, see the [Security & Compliance page](https://www.cypress.io/security).

## Disable AI

### For an individual session

You can disable Studio AI for any individual session by clicking the AI status indicator in the status bar at the bottom of the Studio panel. This disables AI recommendations for your current session only. It does not affect other users, other projects, or your organization's AI settings.

### For an entire organization

Organization admins and owners can disable AI capabilities for their entire organization from Cypress Cloud organization settings. This affects all users in the organization.

For more information, see [Disabling AI features](/llm/markdown/cloud/features/cypress-ai-features.md#Disabling-AI-features).

## Usage limits

Recommendation limits are per user, per hour. All plans share a limit of 10 parallel recommendation requests.

| Plan | Recommendations per hour |
| --- | --- |
| Free Cloud account | 60 |
| Paid Cloud account (or free trial) | 300 |

During the beta, Studio AI is included at no additional charge. Limits and pricing are subject to change. We'll communicate any adjustments before they take effect.

If you need to increase your limits, please contact support at [support@cypress.io](mailto:support@cypress.io).

## Known limitations

### Studio

*   E2E tests only — Component Testing is not yet supported.
*   Cucumber-style tests are not yet supported.
*   Studio cannot record interactions across [multiple origins](/llm/markdown/app/guides/cross-origin-testing.md).
*   iFrames and Shadow DOM are not supported.

### Studio AI

*   Studio AI requires Cypress version 15.11.0 or later.
*   Animations and transitional UI states may produce intermediate DOM diffs, which can affect AI recommendation quality.
*   Large pages may exceed AI context window limits resulting in no recommendations being generated.
*   No automatic application crawling. Studio AI only observes what you interact with.

See [open issues labeled `topic: studio`](https://github.com/cypress-io/cypress/issues?q=is%3Aissue%20state%3Aopen%20label%3A%22topic%3A+studio%22) for the full list.

## Send feedback

There's a feedback button at the bottom of the Studio panel. Use it. This is a beta and your input directly shapes what we prioritize next.

## See also

*   [Element Selector API](/llm/markdown/api/cypress-api/element-selector-api.md)
*   [Cypress Cloud plans](https://www.cypress.io/pricing)
*   [Security & Compliance](https://www.cypress.io/security)
*   [cy.prompt()](/llm/markdown/api/commands/prompt.md)
