locator-replacer
CommunityReplace placeholder locators with selectors.
AuthorDanielSuo117
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This skill replaces placeholder locators in page object models with real, stable selectors using a six-tier priority strategy to improve test reliability.
Core Features & Use Cases
- Six-level locator strategy: P0 ARIA-role based, P1 text, P2 form attributes, P3 stable CSS classes (non-hash), P4 data-testid, P5 relative XPath.
- Automated page object updates: rebinds existing elements with the new selectors and annotates their priority in comments.
- Supports progressively updating tests after DOM changes and during UI refactors, minimizing flakiness.
- Example: when a text placeholder becomes dynamic, locate with role+name or text first, then fallback to attributes or XPath.
Quick Start
Run the locator-replacer over your page objects to replace placeholders with concrete selectors.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: locator-replacer Download link: https://github.com/DanielSuo117/velocitai/archive/main.zip#locator-replacer Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 510,000+ vetted skills library on demand.