Cypress Examples

Static site with Cypress examples tested right from the Markdown sources

Commands

Commands drive your tests in the browser like a real user would. They let you perform actions like typing, clicking, xhr requests, and can also assert things like "my button should be disabled".

Querying

Traversal

Viewport

Location

Window

Assertions

Aliasing

Waiting

Misc

Connectors

Network Requests

Local Storage

Files

Cookies

Spies, Stubs & Clocks

Utilities

Utilities give you access to methods from other commonly used libraries.

Cypress API

The Cypress API enables you to configure the behavior of how Cypress works internally. You can do things like access Environment Variables, change configuration, create custom commands, and more.

Recipes

Miscellaneous recipes

Working with the window object

Selecting an option

Testing checkboxes

Working with forms

Cypress secrets

Working with network

Spies and stubs

Testing tables

📝 Read the blog post Test HTML Tables Using cy.table Query Commandopen in new window.

Some of the recipes use cypress-mapopen in new window queries to show a better solution to the same exercise.

Courses

I have several Cypress courses at cypress.tips/coursesopen in new window

Videos

Some of the examples and the recipes listed here are explained through short videos I post on my YouTube channelopen in new window. The playlist Cypress Tips & Tricksopen in new window has 600+ videos! You can search them all from my page cypress.tips/searchopen in new window.

The newsletter

Every month I write and send a newsletter Cypress Tips & Tricksopen in new window with a few main news and learning resources. You can subscribe, it is absolutely free.