web automation locator creator

    1

    Generate stable CSS and XPath locators for Playwright, Selenium, and Cypress with built-in uniqueness validation.

    $10

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    web automation locator creator

    Example session with this skill installed

    Generate locators for the Submit button on the login page. It has a dynamic ID but a stable data-testid='login-submit'. Use Playwright syntax.

    • Read your context and instructions
    • Compiled the web automation locator

    I have generated and validated the locators for the Submit button on the login page. I prioritized the data-testid attribute to ensure stability against the dynamic IDs observed in the DOM.

    Web UI Locators: Submit Button

    DetailValue
    ElementSubmit Button
    PageLogin Page
    FrameworkPlaywright
    Primary CSSbutton[data-testid='login-submit']
    Fallback XPath//button[@data-testid='login-submit' and normalize-space()='Submit']

    Attribute Stability Analysis

    • Stable: data-testid is explicitly defined for testing and should persist across UI changes.

    Volatile: The id attribute (e.g., id="btn_9921") is dynamic and changes on every page load; it has been excluded from these selectors.

    Context: The element is nested within a form[name='login'] container, which provides additional structural anchoring if needed.

    Validation Evidence

    1. Uniqueness Check: The CSS selector was queried against the provided DOM snapshot and returned exactly 1 match.

    Execution Check: A Playwright page.locator() call successfully resolved to the target element without timeout or multiple-match errors.
    3. Fallback Match: The XPath expression resolves to the same node as the primary CSS selector.

    Next steps

    • Copy the Primary CSS locator into your Playwright Page Object Model.
    • Verify the locator in your staging environment to confirm no collisions with other forms.
    • Store this report in your project's docs/locators/ directory for team reference.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Writing resilient UI selectors for web automation is a constant battle against dynamic IDs and brittle DOM structures. This skill generates stable, framework-agnostic locators that survive minor UI updates and layout shifts.

    What it does

    • Multi-framework support generates specific syntax for Playwright, Selenium, Cypress, and Ted.
    • Priority attribute selection targets stable markers like data-testid, aria-label, and name while ignoring volatile timestamps or dynamic hashes.
    • Dual-strategy output creates primary CSS selectors and deterministic XPath fallbacks for every element.
    • Conflict detection ensures every generated locator resolves to exactly one element to prevent flaky test execution.
    • Stability analysis identifies which attributes are reliable and which are likely to break during future deployments.

    How it works

    1. DOM Inspection where the agent snapshots the target element and records structural context and attributes.
    2. Strategy selection to prioritize the most stable attribute available in the current HTML.
    3. Selector construction of primary CSS and fallback XPath strings using short, deterministic logic.
    4. Framework validation via a runtime query to confirm the selector returns a single unique match.
    5. Documentation of the result in a markdown report including validation evidence.

    Frameworks & tools

    The skill supports Selenium, Playwright, Cypress, and Ted. It works with HTML5, standard CSS, and XPath axes.

    Why this beats prompting it yourself

    Generic prompts often return brittle :nth-child selectors or rely on dynamic IDs that change on page reload. This skill enforces a strict hierarchy of stability and mandates a dual-selector approach with a required validation gate to ensure the code actually runs in your test suite.

    Use cases

    • Generating data-testid based selectors for a new React component library.
    • Refactoring brittle XPath strings in a legacy Selenium test suite.
    • Building a locator map for a Playwright project during initial scaffolding.
    • Handling elements with dynamic IDs or complex nested structures.

    Known limitations

    Does not support mobile native applications. Assumes target HTML is accessible and not hidden behind complex iframe or Shadow DOM security layers that block standard inspection.

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Testing & Debugging.

    No support for native mobile apps. Requires accessible DOM structure. Does not guarantee perfection without validation against the live application.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 2 days ago

    Permissions

    Browser
    Write Files
    Listed2 days ago

    What's inside

    Frequently Asked Questions

    This skill eliminates "flaky" tests by prioritizing stable attributes like `data-testid` and `aria-label` while automatically filtering out volatile dynamic hashes and timestamps that typically break automated scripts.

    The skill supports all major web testing frameworks, including Playwright, Selenium, Cypress, and Ted, providing native syntax for both CSS and XPath for every element processed.

    Yes, the skill includes a built-in validation gate that performs a runtime query to ensure every generated selector resolves to exactly one unique element, preventing multi-match errors.

    The skill is designed for web applications and works with standard HTML5, CSS, and XPath; however, it does not currently support native mobile apps or elements hidden inside complex, secured Shadow DOM layers.

    Upon purchase, you receive the full AI agent skill ready for deployment, which includes the multi-strategy selector logic, conflict detection modules, and the markdown reporting template.

    New in Testing & Debugging