Cypress · Method
cy.parent
cy.parent() gets the direct parent of the current DOM element set. It moves up one level and can filter the result with a selector.
Last updated
Syntax
.parent()\n.parent(selector)\n.parent(options)\n.parent(selector, options)In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
.children().parents().parentsUntil()