Effective DOM selector patterns. Interact like a user | Carter Capocaccia

แชร์
ฝัง
  • เผยแพร่เมื่อ 2 ส.ค. 2024
  • When writing tests that interact with your UI, you will likely utilize DOM nodes to isolate elements of your application and perform actions or assertions upon those elements or contents thereof.
    In this talk, Carter ranks DOM node selectors styles into three "tiers" and discusses why he favors some over others and how Cypress enables us to act like a user more than ever before. Using poor selectors is akin to building your house upon sand. You can build a mansion of a test suite using poor selectors, but the test suite will crumble violently and require constant maintenance.
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 3

  • @kegharp84
    @kegharp84 8 หลายเดือนก่อน +1

    Really useful best practise tips for someone like me who is also starting their baby steps with js/automation and cypress :)

  • @MultiMangoPie
    @MultiMangoPie 9 หลายเดือนก่อน

    11:07 rankings of ways to grab elements

  • @pR13S7
    @pR13S7 8 หลายเดือนก่อน +2

    cy.get('button').contains('Buy') - it's kinda anti-pattern. if you want select button with text just use it like - cy.contains('button', 'Buy') with one comand without unnecessary chaining