DEVELOPMENT
← Back to blog

Stable Locators: A Field Guide

By Robin Writer · Playwright

A test that breaks every time a designer changes a margin is worse than no test, because it trains the team to ignore red. Stable locators are the foundation of a maintainable suite. We compare brittle CSS selector chains against role-based and test-id-based locators, and show how to introduce a consistent testid convention without boiling the ocean.

Comments (1)

Loading comments...

Add a comment