🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← 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?

  1. A.A dedicated attribute such as data-testid
  2. B.The element's position on the page
  3. C.Its CSS colour
  4. 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 →