Cypress · Method
cy.first
cy.first() returns the first DOM element from a set of elements. Chain it after a DOM-yielding command, then continue with commands or assertions.
Last updated
Syntax
.first()\n.first(options)In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
cy.get()cy.eq()cy.filter()cy.find()cy.within()cy.should()