API Reference

Cypress

Fast, easy and reliable end-to-end testing for anything that runs in a browser, with automatic waiting.

Official Documentation ↗
CompatibilityThis documentation covers version v13. Check the official docs for the latest API surface.

Installation

npmnpm install --save-dev cypress

Methods

Cypress runs tests inside a real browser with automatic retries, time-travel debugging, and network control.

Key Features

  • Tests run in the browser for direct DOM access
  • Automatic waiting and retry of assertions
  • Network stubbing and request assertions

Usage Notes

Pin a version and check the official docs for the API surface you depend on before upgrading.

API reference evidence

Fetched from official sources on 2026-11-08T17:50:00.000Z via WebFetch https://docs.cypress.io/api/commands/visit.

FAQ

Why not use Selenium?
Cypress runs in the same event loop as the app, so it gets automatic waiting and deterministic timing without explicit sleeps that Selenium requires.
How do I handle third-party login?
Stub the network with cy.intercept or seed the session with cy.session so the test does not depend on an external provider.
Can Cypress test multiple browser tabs?
No. Cypress controls one tab per test and cannot switch tabs; design flows that avoid opening new tabs in tests.