PLAYWRIGHT IN PRACTICE · REFERENCE CARD

Finding elements: getByRole, getByLabel, getByText and test ids

Ask for an element by its job, its label or its words, as a person would, and keep test ids for when nothing else fits.

Derived from Finding elements: getByRole, getByLabel, getByText and test ids. Every claim on this card is sourced on that page. All software testing reference cards.