Skip to content
masterclass Buddy

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.

Subscribe
  • .children()
  • .parents()
  • .parentsUntil()

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