Selectors That Survive the Next UI Update
Strip generated attributes out of every selector and anchor to labels, so the automation does not memorise one record or one screen size.
What it is for
A hardening pass for UI selectors before an automation leaves your machine. It tells you which recorded attributes to delete, what to anchor to instead, and the three tests - different record, different window size, cold start - that expose a brittle selector while it is still cheap to fix. It prevents the automation that works perfectly in development and dies on the first real record.
The skill
Before you call any UI automation finished, harden every selector it depends on. 1. Open each UI activity and read the selector it recorded. Delete every attribute the application generates rather than a developer authored: idx, ids that are a run of digits, window titles carrying a document name, a user name, a date, or a record number. 2. Keep only what a developer would have typed: automation id, name, control type, class, and aaname when it is a fixed label rather than data. 3. Where a row or a cell has nothing stable, anchor it to something that does - the column header, the field label, the section title - instead of its position on screen. 4. Replace the part that changes per record with a variable, and write in the activity's annotation what that variable is bound to. 5. Test on a different record. Not the same record twice. A selector tuned on one invoice number matches exactly one invoice. 6. Test with the window not maximised, and once at a different resolution or display scaling than the machine you built on. 7. Put a real timeout on every element you wait for, and decide per activity whether a miss means retry or stop. Default timeouts hide a slow screen until the day the server is slow. 8. Run the whole process twice end to end from a cold start, with the application closed beforehand and no leftover windows open. The failure this prevents: an automation that passes every test on the developer's machine and fails on the first production record, because the selector memorised that record, that window size, or that logged-in user.
How to install it
1. Open the tool and start a new conversation, project or template. 2. Paste the text below wherever the tool keeps standing instructions — usually called system prompt, instructions, or persona. 3. Save it so it applies to every run rather than a single message.