Testing Frameworks

Command ReferenceGuide

Quick reference guide for commonly used Cypress, Playwright, and k6 commands

CommandDescriptionSyntaxExample
cy.visit()Navigate to a URLcy.visit(url)cy.visit('https://example.com')
cy.get()Get one or more DOM elements by selectorcy.get(selector)cy.get('.my-class')
cy.contains()Get the DOM element containing the textcy.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 resourcecy.wait(time)cy.wait(1000)
cy.intercept()Spy and stub network requests and responsescy.intercept(url)cy.intercept('GET', '/api/users')
cy.request()Make an HTTP requestcy.request(url)cy.request('https://api.example.com')
cy.fixture()Load a fixed set of datacy.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 Sheet

Want to learn more?

Check out our comprehensive training courses on Cypressto master test automation and advance your QA skills.

Explore Training Courses →