~/talk

Effective DOM selector patterns. Interact like a user

Talkat CypressConf 2023 · on Tuesday, 2023-10-17· [testing]
links:none on file
slides:none on file

Shows a concrete failure mode where a three-line Cypress test still passes after the button text is removed, then rewrites the test to query visible text so it fails correctly, ranks selector approaches into tiers, and argues for avoiding XPath, IDs and class-based selectors in favor of Cypress Testing Library or disciplined data-test attributes. Cites a team running thousands of tests per day and over a million per year, and demonstrates that the user-centric selectors reduce false confidence and maintenance cost.

AI-written summary · about

  1. 0:00Introduction
  2. 0:35Personal background
  3. 1:46Agenda overview
  4. 2:34Purpose of automation
  5. 3:42User-centric strategy
  6. 4:19Example of false confidence
  7. 6:19Better testing approaches
  8. 11:08Low-tier selectors
  9. 12:47The case against XPath
  10. 15:35Middle-tier selectors
  11. 18:34Top-tier selectors
  12. 20:45Strategic testing choices
  13. 22:54Key takeaways and closing
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.