assert_
glossary ↓ downloads
track: java · selenium
suite 03 · suite test

Suite test: Web fundamentals

7 questionsevery test must pass to merge

This is the suite's regression gate. Answer every question, then run the suite. Wrong answers show an explanation — read it, then re-run. In this course, like on a real team, you don't merge on a red build.

01.Which attribute exists specifically for automation, and should be preferred when present?
data-test attributes never change for styling reasons — developers add them for you. Asking for them is a professional move, not a weakness.
02.The selector .input_error.form_input (no space) matches…
Chained classes with no space = same element. With a space it would mean descendant — a completely different query.
03.In the DevTools console, $$(…) and $x(…) evaluate…
$$ returns every CSS match; $x every XPath match. Add .length and you have a one-keystroke uniqueness check.
04.What can XPath do that CSS selectors fundamentally cannot?
text() matching and ancestor traversal are XPath's superpowers — the find-by-text-then-climb pattern that unlocks tables and product grids.
05.DevTools' right-click → Copy → XPath is discouraged because it produces…
Absolute paths encode the entire page structure. Short relative XPaths written by hand survive redesigns.
06.Which locator should be your last resort?
Positional selectors break the moment someone reorders the page. Priority: id → data-test → meaningful attribute → hierarchy → position.
07.Before automating a flow, professionals do a “locator pass” — meaning…
It turns coding into assembly and means you debug one new thing at a time — not locators and Selenium simultaneously, in the dark.
passing marks this suite test complete on the roadmap · revision aid: the suite cheatsheet
← Locator strategy — the practice lesson First Selenium framework →