Target exactly one element in each section without CSS selectors or test ids.
- Add "Wireless Keyboard" to the cart. Two products contain "Wireless" and two contain "Keyboard".
- Click Save in the Notification settings panel only, and assert the right panel reported back.
- Click the button named exactly "Delete", not "Delete all" or "Undo delete".
- Archive every Overdue task, then assert that no Overdue badges remain and the Done task is untouched.
- Search the docs for "locators", then click the settings icon button. Neither has a text label.
- Assert the logo image is visible.
Practises:filter({ hasText })filter({ has })getByRole('region', { name }){ exact: true }getByPlaceholdergetByTitlegetByAltTexttoHaveCount
Hint
Archiving removes rows, so a list you collected with all() goes stale. Instead, keep clicking the first Overdue row while the filtered locator still matches something, then assert toHaveCount(0).