Cypress · Method
cy.prev
cy.prev() gets the immediately previous sibling of each current DOM element. An optional selector filters the result.
Last updated
Syntax
.prev()
.prev(selector)
.prev(options)
.prev(selector, options)In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
.next().prevAll().prevUntil()