1×
Become a member
to unlock all features
Autoplay

    Use the Most Robust Selector for Cypress Tests

    cypressCypress
    ^3.1.5

    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