Cypress · Senior · Question 62 of 76

What does a stable selector policy for a team look like?

Show the answer

Correct answer: data-cy for test hooks, roles for accessible elements

Explanation

A written policy keeps selectors consistent and tells developers not to remove test attributes.

Further reading

Problem with a question

Cypress · Senior · question 62

Test yourself

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

Take this quiz