Testing · Middle · Question 26 of 75

Why can getByRole miss an element that is in the DOM?

Explanation

This is usually what you want: hidden elements aren't available to the user either.

Further reading

Problem with a question

Testing · Middle · question 26

Test yourself

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

Take this quiz