Cypress
A runner that loads inside the page it tests: commands queue and re-run themselves, and every step leaves a DOM snapshot you can step back to. Interviewers probe how that placement shapes every test.
on this pageshowhide
guide
overview
~1 minCypress is an end-to-end and component test runner that loads into the browser page it tests. A command is not executed at the call site: each one joins a queue, queries keep retrying until an assertion agrees, and every step leaves a snapshot you can step back to. Interviewers lean on it because that design decides how a correct test is written, and because the classic Cypress bugs — a variable that holds no element, a fixed sleep, a test that leaks state into the next — mostly come from treating a spec like an ordinary script. The hub follows a test from the inside out. [Test runner and commands](/topics/dev-cypress-test-runner) is the command chain itself, and [selectors and assertions](/topics/dev-cypress-selectors-assertions) is how a step names an element and judges it. [Network stubbing and intercept](/topics/dev-cypress-network-stubbing) and [fixtures and custom commands](/topics/dev-cypress-fixtures-custom-commands) are how a suite takes control of data, state and repetition, while the [component harness](/topics/dev-cypress-component-testing) mounts one component instead of a whole app. The [in-browser runtime](/topics/dev-cypress-architecture) explains the placement every limit comes from, and [config and Node events](/topics/dev-cypress-config) the Node process it pairs with. [Debugging and diagnostics](/topics/dev-cypress-debugging) and [pipeline orchestration](/topics/dev-cypress-ci-cloud) cover reading a failure and running the suite unattended, and [choosing and moving](/topics/dev-cypress-positioning) asks when Cypress is the wrong tool. Junior rounds test the queue and the waiting model: what a command yields, when it runs, why a hard-coded wait is the wrong fix. Senior rounds turn to suite design — where seeding belongs, what to stub, how to keep sign-in cheap, how to cut a long pipeline — and to judgement about which limits are permanent. Learn the command chain and retry-ability first; nearly every other section assumes them.
primer
### The runner lives inside the page A spec shares the browser, and the event loop, with the application under test. That is why a test can reach the real `window`, stub a function on it, or read the store directly, with nothing serialized in between. It is also why the hard limits exist: one tab, one origin at a time unless you step into another explicitly, and specs written only in JavaScript or TypeScript. Most "why can't Cypress…" questions are this placement seen from the other side. ### Commands are scheduled, not executed Calling `cy.get()` returns a chainer and records a step; nothing touches the page until the test function has returned and Cypress starts working through its queue. Values therefore arrive through the chain — `.then()`, aliases, assertions — never through a variable or a `return`. Mixing synchronous code with queued commands produces the bugs interviewers like best, because the code reads correctly and runs in a different order. ### Waiting is built in, and it has rules Queries re-run, together with the assertion that follows them, until the assertion passes or the timeout runs out. Actions such as `.click()` change the app, so they fire once, after their own readiness checks. A strong answer explains a flaky test in these terms — which step retries, which does not, what the chain is still holding — instead of reaching for a longer fixed wait. ### Two processes, one narrow seam Behind the browser sits a Node process that reads the config, launches the browser and owns the file system. Fixtures, file reads, `cy.task()` and `cy.request()` all cross to it, and only data that survives JSON comes back. Knowing which side a piece of code runs on settles most configuration, secrets and seeding questions. ### Control state from outside the UI Good suites do not click through sign-up to test a dashboard. They stub or spy on traffic with `cy.intercept()`, seed data through the backend, cache logins with `cy.session()`, and rely on test isolation to start every test from a clean page and empty storage. Interviewers probe where you draw the line between faking and exercising the real system. ### Every step leaves evidence Interactively, each command records a DOM snapshot in the Command Log, so diagnosing a failure means stepping back through what the page looked like. A headless run keeps much less, which is why CI debugging leans on screenshots, optional video and recorded runs instead.
- Command queue
- The ordered list of steps a test body records. Cypress works through it after the test function returns, one command at a time, each waiting for the one before.
- Chainer
- The object every cy command returns. It lets you append further commands to the same chain; it never holds an element or a value.
- Query command
- A read-only command such as cy.get or .find that Cypress may re-run, together with later queries, until the following assertion passes.
- Action command
- A command that changes the application, such as .click or .type. It runs readiness checks first, then fires once and is never retried.
- Retry-ability
- Cypress's waiting model: queries and their assertions are re-evaluated until they pass or defaultCommandTimeout expires, replacing most explicit waits.
- defaultCommandTimeout
- The config value, four seconds by default, that bounds how long a retrying query and its assertion keep trying before the test fails.
- Alias
- A name given with .as() to a subject, route or spy, read back with the @ prefix. Aliases are cleared before every test.
- cy.intercept
- The command that declares a route for matching browser requests and then spies on, stubs, rewrites, delays or fails each request it matches.
- cy.session
- A command that runs a login setup once per id and caches the resulting cookies and storage, restoring them in later tests instead of repeating setup.
- Test isolation
- The default behaviour of resetting the page, cookies and browser storage before each test, so no test depends on what an earlier one left behind.
- cy.task
- A command that sends a JSON-serializable argument to a Node handler registered in the config and yields its result back into the chain.
- cy.origin
- A command that runs a block of commands against a second origin, which Cypress evaluates there with only the arguments passed in.
- Command Log
- The runner's left-hand panel listing every command, assertion and request, with a DOM snapshot per step in interactive mode.
- Cypress Cloud
- The paid service a run records to with --record. It coordinates parallel machines, balances spec files and keeps results, flake data and replays.
Follow one spec from the command line to a result. `cypress open` or `cypress run` starts the Node process, which reads `cypress.config.js`, runs `setupNodeEvents`, and launches a browser. For end-to-end tests the spec is bundled and loaded beside your app's page; for component tests a dev server built on your own bundler compiles the spec, and a registered `mount` command renders one component into a bare page instead. When the test body runs, it only records commands. Cypress then drains the queue: queries retry against the live DOM, actions check readiness and fire, and routes declared earlier with `cy.intercept()` catch the app's requests as they happen. Anything the browser cannot do — read a file, seed a database, make a request without CORS — goes back to Node through a fixture, `cy.task()` or `cy.request()`. Between tests, isolation wipes the page and storage, and `cy.session()` restores whatever login was cached. The output depends on the mode. Interactively you get the Command Log with its snapshots; headless you get an exit code, failure screenshots and, if recorded, a Cypress Cloud run that can split spec files across machines. ```javascript // cypress.config.js — runs in Node const { defineConfig } = require('cypress') module.exports = defineConfig({ e2e: { baseUrl: 'http://localhost:3000', setupNodeEvents(on) { on('task', { seedOrders: (rows) => db.insert(rows).then(() => null) }) }, }, }) // orders.cy.js — runs in the browser cy.task('seedOrders', [{ id: 1, total: 42 }]) // JSON across the seam cy.intercept('GET', '/api/orders').as('orders') // a spy: no reply given cy.visit('/orders') cy.wait('@orders') cy.get('[data-cy=order-row]').should('have.length', 1) ``` Each line belongs to one of the sections below: the task to config, the route to network stubbing, the wait and the retrying query to the runner, and the `data-cy` selector to selectors and assertions. The handler returns `null` on purpose, because a task that resolves nothing fails the command that called it.
- Test Runner and Commands →
The command queue, what each step yields and what retries; every other section assumes this model.
- Selectors and Assertions →
How a step finds elements and asserts on them, where retry-ability shows up in daily test code.
- Network Stubbing and Intercept →
Taking control of the backend: spying, stubbing and waiting on requests instead of on time.
- Fixtures and Custom Commands →
The reuse layer, seeding, custom commands and cached logins, once single tests are solid.
- In-Browser Runtime →
Why the tool works, and stops working, the way it does: in-page placement, origins, tabs and browsers.
- Config and Node Events →
The Node side of a run: config layout, values and secrets, and tasks that cross the seam.
Assigning
cy.get()to a variable and expecting an element: it holds a chainer, and the query has not run yet.Fixing a flaky test with
cy.wait(5000)instead of waiting on an aliased request or an assertion that retries.Asserting inside
.then()with a bareexpectand assuming it retries: only queries chained before an assertion are re-run.Keeping a stale element after a re-render: the chain holds the old node, not the selector, so query again after the change.
Logging in through the UI before every test instead of seeding state from outside or caching it with
cy.session().Creating aliases or state in
before()and expecting later tests to see them; isolation and alias clearing reset both per test.Promising multi-tab flows, a second browser in one test, or specs in another language: those limits follow from running inside the page.
Expecting
cy.intercept()to seecy.request()traffic: that request comes from Node, so no browser route matches it.Passing
--parallelwithout recording to Cypress Cloud; splitting spec files across machines is a Cloud service, not a runner feature.
This guide assumes Cypress 16, the version the questions below describe. Several older changes still come up, because many suites were written against earlier releases: - **10** replaced `cypress.json` and the plugins file with `cypress.config.js`, its `e2e` and `component` blocks, and `setupNodeEvents`, and brought component testing into the same app. - **12** turned test isolation on by default, made `cy.session()` and `cy.origin()` generally available, and introduced query commands that re-run the whole chain of queries, which removed most detached-element errors. - **13** switched video recording off by default. - **16** removed `Cypress.env()` in favour of `cy.env()` for secrets and `Cypress.expose()` for public values, moved request interception in Chrome-family browsers onto the browser's own network stack,. In 16, WebKit support is still experimental and the bundled Electron browser is deprecated. When an answer depends on these — whether state survives between tests, where a value is read from, whether traffic goes through a proxy — say which era you mean.
Cypress is built on familiar parts: Mocha supplies the test structure and hooks, Chai the assertions, Sinon the spies and stubs, and jQuery-style selection the element queries. Plugins fill known gaps, such as Testing Library queries or real pointer events for hover. It is most often weighed against Playwright and Selenium WebDriver. Both drive the browser from outside, through a protocol: that costs the direct access to the app's objects that Cypress has, but allows several tabs, origins and browser contexts in one test, and specs in more than one language. Selenium also reaches the widest range of browsers. A defensible choice names the project — a team-owned JavaScript app tested in Chrome-family browsers or Firefox suits Cypress; cross-site flows, real Safari sign-off or a non-JavaScript team point elsewhere. On the component side, Cypress competes with simulated-DOM runners such as Jest or Vitest with Testing Library, which are faster per test but cannot prove layout, visibility or CSS. [Choosing and moving](/topics/dev-cypress-positioning) covers these judgements, and porting in either direction, in depth.
explore
- Q-34048In Cypress, what does `const rows = cy.get('[data-cy=book-row]')` put into `rows`?level: juniorimportance: must knowfreq 88%
- Q-34054In a Cypress test, when do the cy commands in the test body actually run?level: juniorimportance: must knowfreq 88%
- Q-33861In Cypress, what is the difference between `cypress open` and `cypress run`?level: juniorimportance: must knowfreq 85%
- Test Runner and Commands44 questions
- Chain Construction15 questions
- Retry-Ability9 questions
- Setup and Cleanup10 questions
- Driving the Page10 questions
- Selectors and Assertions29 questions
- Finding Elements20 questions
- Expectation Styles9 questions
- Network Stubbing and Intercept25 questions
- Request Matching15 questions
- Reply Shaping10 questions
- Fixtures and Custom Commands25 questions
- Canned Inputs10 questions
- Shared Helpers15 questions
- Component Harness20 questions
- Mount and Teardown5 questions
- Passing Props and Spying5 questions
- Styles and Assets5 questions
- Real Browser Cost5 questions
- Pipeline Orchestration25 questions
- Unattended Execution10 questions
- Scaling a Run15 questions
- In-Browser Runtime30 questions
- Paired Processes14 questions
- Hard Ceilings16 questions
- Config and Node Events20 questions
- Settings File Layout5 questions
- Exposed Values and Secrets5 questions
- Task Round-Trips5 questions
- Sandbox Reach Limits5 questions
- Debugging and Diagnostics21 questions
- Command Log Time Travel4 questions
- Stepping Through a Run6 questions
- Saved Failure Media6 questions
- Snapshot Fidelity Limits5 questions
- Choosing and Moving17 questions
- Running Inside the Page4 questions
- One Language Only4 questions
- Porting Specs Across Runners5 questions
- Fit and Misfit Cases4 questions
questions
256 · 10 sectionsIn Cypress, what does `.click()` check about an element before it fires the click?
basics
~20 sCypress re-runs a fixed readiness list before every action: it scrolls the element into view, then requires it to be attached, visible, enabled, not readonly, not animating and not covered at the point the event will land.
In Cypress, what does `.type()` do with text wrapped in curly braces?
basics
~20 sCypress reads curly braces in .type() as special key sequences rather than literal characters, so {enter} presses Enter and {selectall} selects the field. An unrecognised sequence throws. Type a literal brace with {{}, or pass the option parseSpecialCharSequences: false.
In Cypress, what does `const rows = cy.get('[data-cy=book-row]')` put into `rows`?
basics
~20 sA Cypress chainer object: a handle you use to append more commands to that chain. It holds no element and no jQuery data, because at the moment the assignment runs cy.get() has only been queued, not executed.
In a Cypress test, when do the cy commands in the test body actually run?
basics
~20 sCypress commands do not run when you call them. Each cy call only appends a step to an internal command queue and returns immediately; Cypress drains that queue, one step at a time, after the test body function has returned.
In Cypress, what does cy.wrap() do, and when do you need it?
basics
~20 scy.wrap() starts a Cypress chain whose subject is the value you hand it - a plain object, a number, a jQuery element or a promise - so queries, .should() assertions, .its() and .invoke() can run against it.
In Cypress, how do you write an `expect()` assertion inside a `.then()` callback?
basics
~10 sCypress makes Chai's expect and assert global in every spec, so inside .then(($rooms) => ...) you call expect($rooms).to.have.length(4) straight on the yielded subject. A throw from that expect fails the test at that command.
In Cypress, what does .should('have.text', 'Deluxe King') do when chained onto cy.get()?
basics
~10 sIt attaches a Chai-jQuery assertion to the preceding cy.get(), and Cypress keeps re-evaluating the query and the check until the element's text matches or the four-second default command timeout expires, then fails the test.
In Cypress, how do you find an element by its `data-cy` test attribute?
basics
~20 sPass a CSS attribute selector to cy.get(), as in cy.get('[data-cy="room-card"]'). Cypress ships no dedicated test-id command: the attribute is ordinary markup and the selector is ordinary CSS, matched the way jQuery's $() matches, with data-cy carrying no special status.
In Cypress, why does a re-render detach the element your chain already holds?
basics
~20 sA Cypress chain carries a concrete DOM node, not the selector that found it. A re-render throws that node away and mounts a fresh one, so the node your chain still holds is no longer in the document.
In Cypress, what does `cy.get('.room-card')` yield when the page renders 12 room cards?
basics
~20 sOne jQuery-wrapped collection holding all 12 room-card elements, not a single DOM node and not an array. Its length is 12, and the whole set becomes the subject the next command in the chain receives.
In Cypress, what does `cy.wait('@getForecast')` yield to the next command?
basics
~20 scy.wait on an intercept alias yields one interception object for that request-response cycle: request and response, plus id, routeId, and an error property when the request failed. Chain .its() or .then() to assert on it.
What are the three ways to call Cypress's `cy.intercept()`, and what does each match?
basics
~10 sCypress accepts cy.intercept(url), cy.intercept(method, url) and cy.intercept(routeMatcher). A bare url matches every HTTP method; the method form narrows it to one; the routeMatcher object matches fields such as pathname, query and headers together.
In Cypress, what turns a `cy.intercept()` route from a spy into a stub?
basics
~20 sThe response argument. A Cypress cy.intercept('GET', '/api/forecast') with no second argument only spies, and the request still reaches the real server. Supply a StaticResponse, a plain body, or a handler that calls req.reply() and Cypress answers it instead.
In Cypress, how does a `cy.intercept()` 500 stub differ from `forceNetworkError`?
basics
~20 sA 500 stub sends a real HTTP response the application can read, so its status and error body are available. forceNetworkError destroys the browser connection instead: no status, no headers, no body, and the app's fetch rejects.
In Cypress 16, why is `req.httpVersion` undefined inside a `cy.intercept()` handler in Chrome?
basics
~20 sBecause Chrome, Chromium and Edge now intercept on the native browser network. The browser negotiates the protocol with your server directly, and that is not known when the request is paused, so Cypress reports no value rather than a wrong one.
Cypress 16 removed cy.exec() - how do you run a setup command now?
basics
~20 scy.exec() was removed in Cypress 16 and now throws; use cy.task() instead, calling a handler registered under the task event in setupNodeEvents. The execTimeout option was removed with it, and taskTimeout, default 60000 ms, replaces it.
In Cypress, how does cy.fixture('receipts') resolve a file with no extension?
basics
~20 sCypress joins the path onto fixturesFolder, which defaults to cypress/fixtures. If that exact file exists it is read; otherwise Cypress tries a fixed extension list, .json first, and yields the first match, parsed according to that extension.
Cypress has no built-in cy.mount(): how do you make it available to every component spec?
basics
~10 sCypress ships no cy.mount command. You import mount from a framework adapter - cypress/react, cypress/vue, cypress/angular or cypress/svelte - and register it once with Cypress.Commands.add('mount', mount) in cypress/support/component.js, which loads before every spec.
In a Cypress component test, how do you assert that a component invoked its `onRate` callback prop?
basics
~20 sCreate a Cypress spy with cy.spy(), name it with .as(), and pass it into cy.mount() as the prop. Drive the component, then assert through the alias: cy.get('@onRate').should('have.been.calledWith', 4). The alias is what makes the assertion retry until the callback fires.
Why does a component mounted by Cypress's cy.mount() render unstyled?
basics
~20 sCypress renders components into cypress/support/component-index.html, not your application's page, so nothing the app's entry file does at startup has run. Import your global stylesheets in cypress/support/component.js, or add the same link tags to that index file.
In a Cypress component test, why does an aliased spy assertion retry when `expect(spy)` does not?
basics
~20 scy.get('@alias') is a Cypress query, so the chained assertion is re-run against the spy until it passes or defaultCommandTimeout expires. A bare expect(spy) inside .then() is plain Chai: it runs once, at that instant, and loses the race whenever the callback is late.
Why does a Cypress component mount cost more than a simulated-DOM render?
basics
~20 sCypress mounts the component in a real browser, so every test pays for a compiled dev-server bundle, a loaded page, real layout and paint, and a snapshot per command. That buys a real box model, real visibility and real CSS.
What do the Cypress Docker images cypress/base, cypress/browsers and cypress/included contain?
basics
~20 scypress/base carries Debian, Node.js and the OS packages Cypress needs, but no browser. cypress/browsers adds Chrome, Firefox and Edge. cypress/included adds a tag-pinned Cypress installed globally. cypress/factory generates a custom image when no published combination fits.
In Cypress, what is the difference between `cypress open` and `cypress run`?
basics
~20 scypress open launches the interactive Cypress app: you pick a spec, watch it run in a visible browser, and it reruns every time you save. cypress run executes matching specs once, headlessly, then exits with a status code a pipeline reads.
In Cypress Cloud, what does it mean when a recorded run is flagged flaky?
basics
~20 sAt least one test in that run failed an attempt and then passed on a later attempt of the same code. Cypress Cloud counts those tests and badges the run, so a run can finish green and still be flaky.
What does a project need before `cypress run --record` uploads to Cypress Cloud?
basics
~10 sTwo things: a projectId in the Cypress config (or CYPRESS_PROJECT_ID) naming the Cloud project, and a record key passed as --key or exported as CYPRESS_RECORD_KEY. The projectId says where; the key authorises writing there.
What exit code does `cypress run` return, and what does `--posix-exit-codes` change?
basics
~20 sBy default cypress run exits with the number of failed tests, Mocha-style: three failures give status 3, and 0 means everything passed. Passing --posix-exit-codes makes any test failure exit 1 instead, and adds 112 for a Cypress Cloud network failure.
Which browsers can Cypress 16 launch, and how do you pick one for a run?
basics
~20 sCypress 16 launches Chrome-family browsers - Chrome, Chrome for Testing, Chromium and Edge - plus Firefox, experimental WebKit, and the deprecated bundled Electron. Choose one per run with the --browser flag, or set defaultBrowser in the Cypress config.
In Cypress, how do you test a link that opens in a new browser tab?
basics
~20 sCypress drives a single tab and has no tab-switching command, so assert the link rather than follow it: check its href and target attributes, request the URL directly with cy.request, or strip the target attribute so the click navigates the current tab.
Why does a console.log() in a Cypress spec never reach the terminal running cypress run?
basics
~20 sSpec code is evaluated inside the browser, so console.log() writes to that browser's DevTools console. The terminal belongs to Cypress's separate Node process, which only prints what code in cypress.config.js and its Node handlers log.
In Cypress, what happens to a request whose host matches a `blockHosts` pattern?
basics
~10 sCypress ends the request itself and answers 503, adding an x-cypress-matched-blocked-host header naming the pattern that matched. The request is never sent, so it resolves immediately instead of waiting on a third party.
Why did Cypress 16 remove `Cypress.env()`, and what replaced it?
basics
~20 sCypress.env() hydrated every configured environment variable into the browser, so reading one value exposed them all. Cypress 16 removed it and split the job: cy.env() reads secrets asynchronously and keeps them in Node, while Cypress.expose() serves public values synchronously.
In a Cypress `cypress.config.js`, which options must sit inside the `e2e` block, not the root?
basics
~20 sThe testing-type-only keys: baseUrl, specPattern, supportFile, excludeSpecPattern, slowTestThreshold and testIsolation. Cypress refuses to start and names the offending key if one of them appears at the root of the exported object, telling you to move it into e2e or component.
Which Cypress commands let a spec running in the browser reach the file system?
basics
~10 sOnly four: cy.fixture(), cy.readFile(), cy.writeFile() and cy.task(). Spec code is browser JavaScript with no fs module, so each of those hands the work to the Node process that loaded the Cypress config.
In Cypress, what must an `on('task')` handler in `setupNodeEvents` return?
basics
~20 sIt must return a value, null, or a promise that resolves to one of those. Returning undefined fails the calling command with a message naming the task, because Cypress reads undefined as "no handler answered this event".
Cypress's `cy.env()` never logs a value, so how do secrets still reach the Command Log?
basics
~20 scy.env() logs only the key names you asked for, and that protection ends when it yields. The object you receive is an ordinary JavaScript object that Cypress does not mask or track, so assertions, .its(), .invoke() and failing commands all print what they touch.
In Cypress, what does a failing `cypress run` leave on disk by default?
basics
~20 sOne PNG per failed test, written under cypress/screenshots, because screenshotOnRunFailure defaults to true. No video: the video option defaults to false, so cypress/videos stays empty until you enable it. Neither of those happens in cypress open mode.
In Cypress open mode, what does cy.pause() let you do to a running spec?
basics
~20 scy.pause() stops the spec before the next queued command and hands control to the Command Log, where Resume finishes the run and Next advances exactly one command. While stopped you can click through the application, inspect the DOM, and read network traffic and storage.
In the Cypress Command Log, what do hovering and clicking a command do?
basics
~20 sHovering a Cypress Command Log entry restores the app under test to the DOM snapshot taken when that command ran. Clicking pins that snapshot so it stays put, and prints the entry's console properties to the browser console.
In Cypress's `cy.screenshot()`, what do capture 'viewport', 'fullPage' and 'runner' capture?
basics
~20 sviewport captures the application as it fits the current viewport, fullPage scrolls and stitches the whole application top to bottom, and runner captures the entire browser viewport including the Cypress Command Log. The default is fullPage.
In a Cypress test, why does .debug() pause where a bare debugger line does not?
basics
~20 sA bare debugger in the test body runs immediately, before any queued cy command has executed, so it stops on an untouched page. .debug() is itself queued, so it fires in order, with the previous command's subject in hand — the same effect as a debugger inside .then().
Which projects is Cypress a strong fit for, and which are the classic misfits?
basics
~20 sCypress fits an application your own team owns: JavaScript or TypeScript, one superdomain per test, Chrome-family or Firefox. The classic misfits are third-party sites, two-browser or second-tab flows, a real Safari or mobile-device sign-off, and spidering or performance work.
What does it mean that Cypress runs your test code inside the browser?
basics
~20 sCypress loads your spec into the browser alongside the application, so both run in the same run loop. Nothing is serialized between a command and an element: the test holds the real window, document and DOM nodes directly.
In Cypress, which languages can specs be written in, and why is that permanent?
basics
~20 sJavaScript and TypeScript, and nothing else. Cypress evaluates spec code inside the browser alongside the application, so the only language it can ever run is the language of the web; the docs list this as a permanent trade-off.
Which of a ported suite's waits vanish into Cypress retry-ability, and which do not?
basics
~20 sWaits for an element to appear, become visible or change text vanish: cy.get() and .should() retry inside defaultCommandTimeout. Network waits become cy.intercept() plus cy.wait('@alias'). Waits on state outside the browser do not vanish at all.
Porting a suite to Cypress, what replaces its XPath locators?
basics
~10 sCypress has no first-class XPath support: cy.get() takes a CSS selector. Text-based XPath becomes cy.contains(), structural XPath becomes a CSS selector, and XPath axes become traversal commands such as .find(), .parent(), .next() and .eq().