Question 3 of 10Pro Only

What are test selectors, and what strategies do you use for writing reliable selectors in your automation tests?

Sample answer preview

Test selectors, also called locators, are the mechanisms your automation framework uses to find and interact with elements on a web page. Choosing the right selector strategy is fundamental to building reliable, maintainable tests that do not break with every UI update.

selectorslocatorsdata-testidARIA rolesCSS selectorsXPath

Unlock the full answer

Get the complete model answer, key points, common pitfalls, and access to 9+ more QA / Test Engineer interview questions.

Upgrade to Pro

Starting at $19/month • Cancel anytime