Duration
4 min
Access
Pro
Transcript
Available

Which selectors your choose for your tests matter, a lot. In this lesson, we'll see the recommended Cypress best practices for selectors, and why we should prefer the data-cy attribute.

Recommended Homework:

  • Finish the example using cy.contains, and remove the false positives to get a richer sense of why data-cy is a better choice for our selector