CSS or XPath: pick the stable locator
Choose the locator that will still work after the page changes.
The diagram
Mei needs to find the Save button on the Add task form. The button is <button data-test="save-task" class="btn btn-blue btn-lg">Save</button>. Pick the best locator at each step.
0 of 4 steps chosen.
SYNTHETIC / TRAINING ONLY. The Daily List app and the people in it are made up, and every number is a teaching figure.
What this shows
A stable locator uses a test attribute or a clear role, not a position or a long path.