Cypress · Middle · Question 71 of 77

How do you test keyboard navigation in Cypress?

Show the answer

Correct answer: Press Tab (natively or via a plugin) and check focus

Explanation

Asserting cy.focused() after each key checks focus order and visible focus.

Further reading

Problem with a question

Cypress · Middle · question 71

Test yourself

Take the Cypress · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz