SuperAPIAI Directory

k11techlab-selenium-qa-mcp

github.com · AI developer platforms

k11techlab-selenium-qa-mcp is an MCP server and Claude Code plugin developed by K11 Software Solutions for Selenium testing in Python and Java. It provides three core capabilities: validating locators on real pages to ensure each locator matches exactly one element; converting user stories, Gherkin scenarios, or acceptance criteria into pytest, JUnit 5, or TestNG test skeletons; and self-healing locators after UI changes based on baseline fingerprints, with reviewable audit reports. It supports Claude Code, Claude Desktop, and any MCP client, and test code does not need to be migrated to Playwright.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)

About this tool

k11techlab-selenium-qa-mcp is an MCP server and Claude Code plugin for Selenium testing, supporting Python (pytest) and Java (JUnit 5 / TestNG, Maven or Gradle) projects based on Selenium 4. Its goal is to give AI assistants facts rather than guesses when writing and maintaining Selenium tests, and to leave teams a reviewable record of fixes.

Purpose and main capabilities

  1. Validate locators: The server opens real pages in Selenium and returns locators that match exactly one element, ordered by stability (data-testid, stable id, name, link text, aria-label, text-based XPath), and outputs them in the project language, such as Python's (By.ID, "email") or Java's By.id("email").

  2. Story to test: Convert "As a... I want... so that..." user stories, Gherkin scenarios, or acceptance criteria items into pytest, JUnit 5, or TestNG skeletons, with one test per scenario, including explicit waits and driver setup. The workflow prompt is story_to_selenium; /story-to-test first calls review_user_story to identify the questions testers would ask first, and if there are doubts, asks the user and waits rather than guessing; if the user insists on continuing, unresolved questions are written into the tests and the final report as OPEN QUESTION comments.

  3. Structured test runs: Run pytest, Maven, or Gradle suites and, for each failure, report the exact locator Selenium could not find and the line of code that requested it, including inside Page Objects.

  4. Self-healing with evidence: When the UI changes, match current page elements based on baseline fingerprints (role, accessible name, test id, id, name, type, label, placeholder, classes, text, href), and provide validated alternative locators, confidence, rationale, and runner-up candidates. Mark as healed only when confidence is at least 0.55 and clearly ahead of the runner-up; otherwise mark as needs_review or not_found.

  5. In CISelf-healing: heal-ci applies only fixes with confidence of at least 0.7 (--min-confidence) and a clear lead, edits tests, Page Objects, helper code, and @FindBy annotations, reruns affected tests and rolls back changes that still fail, retains failures not caused by locators, and generates heal-report.md (PR description) and heal-report.json (full evidence) plus GitHub Actions output. Without --apply, it is a dry run.

Usage

For Claude Code, installing as a plugin is recommended to get MCP tools and the /story-to-test and /heal-tests commands (requires uv). Alternatively, add only the MCP server, or run pip install k11-selenium-qa-mcp and then use claude mcp add selenium-qa -- k11-selenium-qa-mcp. The server works on the project at QA_MCP_ROOT or in the current directory; Python tests use the project interpreter (QA_MCP_PYTHON, or .venv/venv within the project, otherwise the server Python, which requires pytest and selenium); Java tests preferentially use the project Maven/Gradle wrapper. Project language is detected from pom.xml/build.gradle and can be overridden with QA_MCP_LANGUAGE=python|java.

Login pages and multi-step flows

Page tools accept session parameters: storage_state (cookies and localStorage saved by save_login_state, in the same format as Playwright, and must be within the project) and steps (goto, click, fill, press, select, check, uncheck, wait_for, up to 25 steps, including explicit waits). Use ${ENV:APP_PASSWORD} placeholders for secrets; results show the placeholder, and literal fill values are masked with •••.

Security and limitations

Locators are parsed only, not eval'ed; only a single By form and @FindBy annotations with string literals are accepted; writes are limited to tests/ or src/test/java/ (write_test) or precise locators (heal-ci), located via a Python tokenizer or a comment-aware Java scanner, preserving line endings; tests are not run through a shell, and Java test filters are validated against strict patterns; self-healing in MCP tools is advisory only, and only heal-ci --apply modifies code and provides it as a PR for review.

Requirements and not yet available

Requires Python 3.10+ and Chrome (or use Edge/Firefox via QA_MCP_BROWSER=edge|firefox), Selenium Manager automatically downloads drivers; Java projects require Maven or Gradle (or a wrapper). Settings, baselines, and reports are stored in .qa-mcp/; baselines.json should be committed, and .qa-mcp/auth/ should not be committed. Currently unsupported: C# (NUnit) projects, Java runtime page URL recording (currently from baselines or configuration), self-healing for chained find_element and find_elements(...)[n], and screenshot visual fingerprints. The project is under the MIT license. Information on fees, pricing, and specific platform support scope is not yet available.

Up/Down to navigate · Enter to open · ESC to closeBrowse all tools