Testing · Middle · Question 32 of 75
How can you find the best query for an element quickly?
- ✓Correct answer:
screen.logTestingPlaygroundURL()orlogRoles(container)to see roles and names - 2Copy a selector from DevTools
- 3Use
getByTestIdeverywhere
Explanation
logRoles prints all roles in the tree with their accessible names.