Cypress · Middle · Question 72 of 77
What does cy.focused() yield?
- 1The test that is currently running
- 2The last element that was clicked
- 3The element that currently has focus
Show the answer
Correct answer: The element that currently has focus
Explanation
Combined with key presses, it checks that focus moves where expected, for example into an opened dialog.