Cypress · Function
cy.get
cy.get() finds DOM elements with a selector or retrieves an aliased value. It retries until the query and chained assertions succeed or the timeout expires.
Last updated
- Since
- 5.2.0 for the `includeShadowDom` option; 12.0.0 for aliases
Syntax
cy.get(selector)
cy.get(alias)
cy.get(selector, options)
cy.get(alias, options)In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
.as()cy.contains().find().within().first().eq()