Browser automation has a dirty secret: the code you write today is already dying.
You spend two hours reverse-engineering a login form. You figure out the exact XPath. You write //div[@class='auth-container']//input[@data-testid='email-field'] and it works. You ship it. You forget about it.
Three weeks later it breaks. The frontend team ran an A/B test and swapped data-testid for id. Or they rolled out a redesign. Or they just changed a class name.
This happens constantly. Most browser automation isn't hard to write — it's hard to maintain.
The Selector Problem






