Skip to main content

Menu

LEVEL 0
0/5 XP
HomeAboutTopicsPricingMy VaultStats

Categories

πŸ€– Artificial Intelligence
☁️ Cloud and Infrastructure
πŸ’Ύ Data and Databases
πŸ’Ό Professional Skills
🎯 Programming and Development
πŸ”’ Security and Networking
πŸ“š Specialized Topics
HomeAboutTopicsPricingMy VaultStats
LEVEL 0
0/5 XP
GitHub
Β© 2026 CheatGridβ„’. All rights reserved.
Privacy PolicyTerms of UseAboutContact

Cypress Cheat Sheet

Cypress Cheat Sheet

Back to Developer Tools
Updated 2026-04-29
Next Topic: Debugging in Python and VSCode Cheat Sheet

Cypress is a JavaScript-based end-to-end testing framework built specifically for modern web applications. Unlike traditional testing tools that run outside the browser, Cypress executes in the same run-loop as your application, enabling automatic waiting, real-time reloading, and time-travel debugging. The Cypress platform now extends beyond the open-source App into Cypress Cloud β€” offering Test Replay, Flake Detection, Smart Orchestration, Cypress Accessibility, UI Coverage, and AI-powered features including Studio AI, cy.prompt(), and Cloud MCP for AI coding assistants. The framework supports E2E testing, component testing for React, Vue, Angular, and Svelte, and API testing, making it a comprehensive solution for validating modern web applications at every layer.

What This Cheat Sheet Covers

This topic spans 24 focused tables and 188 indexed concepts. Below is a complete table-by-table outline of this topic, spanning foundational concepts through advanced details.

Table 1: Core Navigation and Query CommandsTable 2: Action CommandsTable 3: AssertionsTable 4: Network Requests and API TestingTable 5: Fixtures and Test DataTable 6: Aliases and VariablesTable 7: Waits, Timeouts, and Retry LogicTable 8: Hooks and Test OrganizationTable 9: Browser and Window ManipulationTable 10: Storage and SessionsTable 11: Custom CommandsTable 12: Environment Variables and ConfigurationTable 13: Debugging ToolsTable 14: Time ManipulationTable 15: Spies, Stubs, and MocksTable 16: Tasks and Node IntegrationTable 17: Component TestingTable 18: CI/CD and Headless ModeTable 19: Advanced SelectorsTable 20: Cross-Origin TestingTable 21: Plugins and PreprocessorsTable 22: Accessibility TestingTable 23: AI-Powered TestingTable 24: Best Practices and Anti-Patterns

Table 1: Core Navigation and Query Commands

CommandExampleDescription
cy.visit()
cy.visit('/login')
β€’ Loads the specified URL in the test browser
β€’ accepts relative or absolute paths and waits for page load events.
cy.get()
cy.get('[data-cy="submit-btn"]')
β€’ Queries DOM elements using CSS or jQuery selectors
β€’ automatically retries until elements appear or timeout.
cy.contains()
cy.contains('button', 'Submit')
β€’ Finds element of specific type containing text
β€’ more precise when both element type and text are provided.
cy.find()
cy.get('.form').find('input')
β€’ Searches for descendant elements within previously queried parent
β€’ similar to jQuery's .find().
cy.within()
cy.get('form').within(() => {
cy.get('input').type('text')
})
β€’ Scopes all subsequent commands within a parent element
β€’ useful for form contexts or component isolation.
cy.eq()
cy.get('li').eq(2)
β€’ Selects element at specific index from matched set
β€’ zero-based indexing.
cy.first()
cy.get('li').first()
Returns the first element from a matched set.
cy.last()
cy.get('li').last()
Returns the last element from a matched set.

More in Developer Tools

  • Cursor IDE Cheat Sheet
  • Debugging in Python and VSCode Cheat Sheet
  • AI-LLM Code Generation Cheat Sheet
  • File Formats Cheat Sheet
  • Notepad++ Cheat Sheet
  • Sublime Text Cheat Sheet
View all 55 topics in Developer Tools