KS
Killer-Skills

xpath-testing — how to use xpath-testing how to use xpath-testing, xpath-testing setup guide, xpath-testing alternative, xpath-testing vs selenium, xpath-testing install, what is xpath-testing, xpath-testing tutorial, xpath-testing for AI agents, xpath-testing best practices, xpath-testing for HTML testing

v1.0.0
GitHub

About this Skill

Ideal for Web Scraping Agents needing precise HTML element extraction via XPath expressions. xpath-testing is a skill that allows AI agents to iteratively test XPath expressions against HTML files to find specific elements, following a set of rules to ensure efficient testing.

Features

Tests XPath expressions against HTML files in the test-data directory
Iteratively queries XPath expressions to find specific elements
Starts with broad queries and narrows down to unique XPath expressions
Uses a CLI tool to query HTML files, without reading them directly
Allows listing of files in the test-data directory to see available options
Works in a game-like scenario, where the AI agent iteratively refines its queries

# Core Topics

testomatio testomatio
[0]
[0]
Updated: 3/6/2026

Quality Score

Top 5%
39
Excellent
Based on code quality & docs
Installation
SYS Universal Install (Auto-Detect)
Cursor IDE Windsurf IDE VS Code IDE
> npx killer-skills add testomatio/explorbot

Agent Capability Analysis

The xpath-testing MCP Server by testomatio is an open-source Categories.community integration for Claude and other AI agents, enabling seamless task automation and capability expansion. Optimized for how to use xpath-testing, xpath-testing setup guide, xpath-testing alternative.

Ideal Agent Persona

Ideal for Web Scraping Agents needing precise HTML element extraction via XPath expressions.

Core Value

Empowers agents to iteratively test XPath expressions against HTML files using a CLI tool, providing a unique XPath for specific elements without directly reading HTML files, and leveraging iterative querying for precise element identification.

Capabilities Granted for xpath-testing MCP Server

Testing XPath expressions against multiple HTML files
Iteratively narrowing down broad XPath queries to unique expressions
Identifying specific elements within HTML files using CLI tools

! Prerequisites & Limits

  • Requires access to a CLI tool for querying HTML files
  • Limited to testing XPath expressions against files in a designated test-data directory
  • Never directly reads HTML files, relying solely on CLI tool output
Project
SKILL.md
3.6 KB
.cursorrules
1.2 KB
package.json
240 B
Ready
UTF-8

# Tags

[No tags]
SKILL.md
Readonly

XPath Testing Skill

Test XPath expressions against HTML files in test-data/ to find specific elements. You play a "game" — given a user's request, iteratively query XPath until you find the right element and a unique XPath for it.

Rules

  • NEVER read HTML files directly — only use the CLI tool to query them
  • You may list files in test-data/ to see what's available
  • Work iteratively: start broad, then narrow down

Workflow

1. Identify Target

Ask the user:

  • Which HTML file in test-data/? (list files if needed)
  • What element are they looking for?

2. Explore with Broad Queries

Start with broad XPath patterns to understand the page:

bash
1bun .claude/skills/xpath-testing/xpath-query.ts test-data/<file> "//button" 2bun .claude/skills/xpath-testing/xpath-query.ts test-data/<file> "//a[@href]" 3bun .claude/skills/xpath-testing/xpath-query.ts test-data/<file> "//*[@role]"

3. Narrow Down

Use the tool output to refine your XPath until you find the target element. Run as many queries as needed.

4. Present Result

Once you find the element, present:

  1. Brief explanation of what the element is
  2. Element outer HTML from the tool output
  3. Unique XPath that matches exactly 1 element

5. Verify Uniqueness

MANDATORY: Run the tool one final time with your unique XPath to confirm it returns exactly 1 result. If it returns more than 1, refine further.

CLI Tool Reference

bash
1bun .claude/skills/xpath-testing/xpath-query.ts <html-file> <xpath-expression>

Exit codes:

  • 0 — elements found
  • 1 — no matches
  • 2 — invalid XPath or error

XPath Cheat Sheet

Basic Element Selectors

//button                          All buttons
//a[@href]                        All links with href
//input                           All inputs
//select                          All select dropdowns
//form                            All forms

ARIA and Accessibility

//*[@role='button']               Elements with button role
//*[@role='link']                 Elements with link role
//*[@role='navigation']           Navigation landmarks
//*[@aria-label]                  Elements with aria-label
//*[@aria-label='Close']          Specific aria-label
//*[@aria-expanded='true']        Expanded elements

Attribute Matching

//input[@type='email']            Email inputs
//input[@name='username']         Input by name
//*[@id='main-content']           Element by ID
//*[contains(@class, 'btn')]      Class contains "btn"
//*[starts-with(@id, 'user-')]    ID starts with "user-"

Text Content

//*[text()='Submit']              Exact text match
//*[contains(text(), 'Save')]     Text contains "Save"
//button[contains(., 'Delete')]   Button containing "Delete" (includes descendants)
//a[normalize-space()='Login']    Link with normalized text "Login"

Structural / Combined

//form//input[@type='email']      Email input inside a form
//nav//a[@href]                   Links inside nav
//table//tr                       Table rows
//*[@role='dialog']//button       Buttons inside dialogs
//ul/li                           Direct child list items
//div[@class='modal']//input      Inputs inside modal div

Positional

(//button)[1]                     First button
(//button)[last()]                Last button
//ul/li[position()<=3]            First 3 list items
//table//tr[2]/td[3]              Cell at row 2, col 3

Logical Operators

//input[@type='text' or @type='email']    Text or email inputs
//button[not(@disabled)]                   Non-disabled buttons
//*[@role='button' and @aria-label]        Buttons with aria-label

Related Skills

Looking for an alternative to xpath-testing or building a Categories.community AI Agent? Explore these related open-source MCP Servers.

View All

widget-generator

Logo of f
f

widget-generator is an open-source AI agent skill for creating widget plugins that are injected into prompt feeds on prompts.chat. It supports two rendering modes: standard prompt widgets using default PromptCard styling and custom render widgets built as full React components.

149.6k
0
Design

chat-sdk

Logo of lobehub
lobehub

chat-sdk is a unified TypeScript SDK for building chat bots across multiple platforms, providing a single interface for deploying bot logic.

73.0k
0
Communication

zustand

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
Communication

data-fetching

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
Communication