Cypress · Matcher
be.focused
Gets the DOM element that currently has focus. It retries until the element and chained assertions are ready, or until the timeout expires.
Last updated
- Since
- 0.20.0
Syntax
cy.focused()
cy.focused(options)In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
.blur().focus()cy.press()focus assertion