Skip to content
masterclass Buddy

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.

Subscribe
  • cy.get()
  • cy.eq()
  • cy.filter()
  • cy.find()
  • cy.within()
  • cy.should()

Source: cy.first() | Cypress API Documentation. Checked 2026-11-03.