← Quiz: Locators: all 10 questions
Quiz: Locators · Question 5 of 10
What is the most robust locator you can ask developers for?
What is the most robust locator you can ask developers for?
- A.A dedicated attribute such as data-testid
- B.The element's position on the page
- C.Its CSS colour
- D.An auto-generated id
Answer & explanation
Correct answer: A dedicated attribute such as data-testid
Test ids don't change when the design changes.
Can you get the rest right without peeking?
Take the timed Quiz: Locators quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →