Cypress · Method
cy.root
cy.root() yields the current root DOM element. It returns <html> by default, or the element scoped by .within().
Last updated
Syntax
cy.root()
cy.root(options)In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
.within()cy.get()should()submit()