Testing Frameworks
Command ReferenceGuide
Quick reference guide for commonly used Cypress, Playwright, and k6 commands
| Command | Description | Syntax | Example |
|---|---|---|---|
cy.visit() | Navigate to a URL | cy.visit(url) | cy.visit('https://example.com') |
cy.get() | Get one or more DOM elements by selector | cy.get(selector) | cy.get('.my-class') |
cy.contains() | Get the DOM element containing the text | cy.contains(content) | cy.contains('Submit') |
cy.click() | Click a DOM element | .click() | cy.get('button').click() |
cy.type() | Type into a DOM element | .type(text) | cy.get('input').type('Hello World') |
cy.should() | Create an assertion | .should(chainers) | cy.get('h1').should('be.visible') |
cy.wait() | Wait for a number of milliseconds or for an aliased resource | cy.wait(time) | cy.wait(1000) |
cy.intercept() | Spy and stub network requests and responses | cy.intercept(url) | cy.intercept('GET', '/api/users') |
cy.request() | Make an HTTP request | cy.request(url) | cy.request('https://api.example.com') |
cy.fixture() | Load a fixed set of data | cy.fixture(filePath) | cy.fixture('users.json') |
Interactive Cypress Commands Cheat Sheet
Explore our interactive periodic table-style reference with 58 commands! Click on any command to see detailed syntax, descriptions, and practical examples.
Open Interactive Cheat SheetWant to learn more?
Check out our comprehensive training courses on Cypressto master test automation and advance your QA skills.
Explore Training Courses →