UI Test Automation Glossary
Plain definitions of the UI test automation terms that cause the most confusion — stale elements, intercepted clicks, shadow DOM, network idle.
The terms behind the errors and the wait conditions, defined plainly. Every entry links to a challenge on this site that reproduces it.
Flaky test
A test that passes and fails against unchanged code. In UI automation the usual cause is a timing assumption — waiting for the wrong condition, or for a fixed duration — rather than genuine nondeterminism in the application.
Explicit wait
A wait for a named condition on a specific element: visible, enabled, detached, or a text value. It ends the moment the condition holds, which makes it both faster and more honest than sleeping for a duration chosen by guesswork.
Implicit wait
A driver-level setting that retries element lookups for a fixed period. It applies to finding elements, not to conditions, so it cannot express "wait until enabled" — and mixing it with explicit waits produces compounded, hard-to-predict timeouts.
Presence
The element exists in the DOM. A presence wait resolves as soon as the node is attached, whether or not it is rendered — which is why it can resolve instantly against an element that is present but hidden.
Visibility
The element is present and actually rendered: non-zero size, not hidden by CSS, not fully transparent by the framework's definition. Frameworks disagree at the edges — `opacity: 0` and off-screen elements are commonly reported as visible.
Stale element reference
The exception raised when a previously located element handle points at a node that has been removed from the document. It means the page replaced the node rather than updating it; the fix is to re-locate, never to cache the handle.
Element click intercepted
The error raised when another element — an overlay, a consent banner, a sticky header — would receive the click instead of your target. Forcing the click hides the problem; dismissing whatever is on top is the behavior a real user would have.
Shadow DOM
An encapsulated DOM subtree attached to a host element. An open shadow root is reachable from script and from modern locators; a closed root returns `null` for `shadowRoot` and is genuinely unreachable, by design rather than by oversight.
Frame switching
Moving the driver's context into an `<iframe>` or `<frame>` so locators evaluate against that document. Locators never cross a document boundary implicitly, and forgetting to switch back to the top-level document is the classic cause of a failure on the next step.
Focus trap
A modal behavior that keeps keyboard focus inside the dialog while it is open and returns focus to the trigger on close. It is testable in three assertions: focus moved in, Tab cycles within, focus returned.
ARIA live region
A container marked so assistive technology announces changes to its content — `role="log"`, `role="alert"`, or an explicit `aria-live`. For automation it is a useful signal that content arrives asynchronously and that the container itself is stable.
aria-activedescendant
An attribute naming the currently active option while DOM focus stays on the controlling input. Comboboxes and listboxes use it, which is why a test that waits for focus to move to the option waits forever.
data-testid
An attribute added purely so tests can locate an element, independent of copy, layout and styling. It is a contract between the application and its tests; the value of having one is lost if the naming has no policy behind it.
Accessible name
The name assistive technology computes for an element, from its label, text content or `aria-label`. Locating by role and accessible name is the closest a test gets to describing the element the way a user perceives it.
Debounce
A delay that collapses rapid repeated events into one — typically a search input that waits for typing to stop before querying. A test that types and asserts immediately races the debounce, which is why the state, not the clock, is the thing to wait for.
Network idle
A heuristic that considers a page ready when no network requests have been in flight for a short interval. Polling, analytics and open streams can keep it from ever being true, and a cached response can make it true before the UI has rendered.
Request interception
Taking over a network request from the test so the response is under your control — an empty list, a 500, a payload that does not exist in production. It is the honest way to test error states that are otherwise impossible to trigger.
HTTP Basic Auth
An authentication scheme where the client sends base64-encoded credentials in an `Authorization` header after a 401 with `WWW-Authenticate: Basic`. The browser prompt is not part of the DOM, so credentials must be supplied through the driver rather than typed.
HTTP Digest Auth
A challenge-response scheme where the client answers a server nonce with an MD5 hash of the credentials, nonce, request method and URI. Most driver credential helpers speak only Basic, so Digest usually means computing the response yourself.
Content-Disposition
The response header that tells a browser to download a body rather than render it, and suggests a filename. It is what turns a URL into a download event a test can wait for and assert against.
Constraint validation API
The browser's own form validation — `required`, `type=email`, `min`, `max`, `pattern` — surfaced through `validity` and `validationMessage`. Its error bubbles are browser chrome, not DOM, so they cannot be located or clicked.
Deterministic test data
Fixtures that render identically on every run, so a failure describes a defect rather than a coincidence. Where randomness is deliberate, a seed or a force parameter keeps reproduction possible without giving up the coverage.
Seeded randomness
Randomness derived from an explicit seed, so the same seed reproduces the same sequence. It is what lets a randomized page stay useful in CI: the run that failed can be replayed exactly by passing the seed it used.
IntersectionObserver
A browser API that reports when an element enters the viewport, commonly used to load the next page of an infinite feed. For a test it means the trigger is scrolling a sentinel into view, not clicking anything.
Updated
Fun UI Playground — all challenges, bug hunts, getting started, glossary, about.