Software Testing / Learning brief

Tom picks a locator for the Done button that lasts

What this means in plain language

Tom replaces a brittle path with a test attribute and checks the match count in DevTools.

Understand the full idea, step by step

Analogy: a street address. You can find a house by its number, which is exact. You can say the third house after the blue gate, which breaks when the gate is painted again. Or you can ask for the house with the name plate that says Smith, which breaks when the family moves.

A locator is the way you say which house.

PLAIN WORDS · 1 in this section
locator
a pointer telling you where to find something

Evidence & review

REVIEWED 2026-10-31

The date on this lesson is when it went up on Payments Signal, not when its material was written — most of these were brought across from an earlier catalogue in a single run, which is why so many of them share a date. What the lesson says about the world is dated by the review above and by the sources below it.

Hands-on steps for this tool. The people and the app are invented.

What this brief simplifies: Selected primary passages actually read 7 November 2026; Selenium/version limits stated in lesson. Daily List, rules and observations are synthetic, not an executed live-app test.

Sources for this brief — 3 sources
  1. Market practice

    Locator strategies — Selenium ↗ — Selenium project · Traditional locator strategies; selecting elements in the DOM (selected actual primary passages read 7 November 2026; live Selenium guide/API documentation; no fixed edition claimed).

    Traditional locator strategies; selecting elements in the DOM. Product/language-specific guidance with the stated version scope, not a universal testing standard. · Checked 2026-11-07

    Selected primary passages actually read on the access date; not every linked guide. Live documentation and the explicitly tagged wait implementation have distinct version scopes. Daily List rules, people, identifiers and observations are synthetic; educational examples do not claim a vendor-package or live-app run.

  2. Market practice

    Finding web elements — Selenium ↗ — Selenium project · First matching element in a given search context; scoping the search (selected actual primary passages read 7 November 2026; live Selenium guide/API documentation; no fixed edition claimed).

    First matching element in a given search context; scoping the search. Product/language-specific guidance with the stated version scope, not a universal testing standard. · Checked 2026-11-07

    Selected primary passages actually read on the access date; not every linked guide. Live documentation and the explicitly tagged wait implementation have distinct version scopes. Daily List rules, people, identifiers and observations are synthetic; educational examples do not claim a vendor-package or live-app run.

  3. Simplified educational illustration

    Payments Signal editorial teaching models — Payments Signal · Synthetic Daily List rule and observations stated in the lesson; not a publisher application fact or an executed live-app result.

    This site's own simplified teaching models. · Checked 2026-07-12

    Used wherever diagrams, scenarios, figures, or example values are didactic constructions rather than sourced facts; every such use carries a simplifications disclosure. All people, companies, banks, and list entries in examples are fictional.

Learn this properly

START HERESelenium locators: find elements in a way that survives changeChoose how Selenium finds an element: by id, name, CSS (Cascading Style Sheets) selector or a test attribute.Opens at L0 Explain simply · about 16 min

Related briefs