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.
به چه درد میخورد
سلکتورها را طوری بساز که به یک رکورد خاص یا به اندازه پنجره تو گره نخورند. هر چیزی که خود برنامه تولید میکند - شماره ردیف، شناسه عددی، عنوان پنجرهای که نام سند در آن نشسته - باید برود و جایش لنگر روی برچسب فیلد یا سرستون بنشیند. همان خرابی را میگیرد که روی سیستم توسعهدهنده هرگز دیده نمیشود و اولین رکورد واقعی رویش میافتد.
خود اسکیل
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.
نصبش چطور است
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.