Get the FREE Ultimate OpenClaw Setup Guide →
npx machina-cli add skill aiqualitylab/agent-skills/selenium-selfhealing --openclaw
Files (1)
SKILL.md
1.3 KB

Selenium Self-Healing Skill

Overview

Create Selenium tests that automatically recover from broken locators using local AI (Ollama).

Capabilities

  • Auto-heal broken locators using AI analysis
  • BDD testing with Reqnroll (Gherkin syntax)
  • Works with free local AI (Ollama) or GPT
  • .NET 9 + Selenium WebDriver + NUnit

Usage

Generate Self-Healing Test

Create a Selenium test for login page that:
- Navigates to the login URL
- Enters credentials
- Clicks submit
- Uses self-healing locators

Fix Broken Locator

The locator By.Id("searchBox") is failing.
Analyze the page and suggest alternative locators.

Quick Start

# 1. Install Ollama AI
ollama pull qwen3-coder:480b-cloud

# 2. Clone and run
git clone https://github.com/aiqualitylab/SeleniumSelfHealing.Reqnroll.git
cd SeleniumSelfHealing.Reqnroll.Net9
dotnet test

Installation

skills install aiqualitylab/selenium-selfhealing

Links

Source

git clone https://github.com/aiqualitylab/agent-skills/blob/main/skills/selenium-selfhealing/SKILL.mdView on GitHub

Overview

Selenium Self-Healing creates tests that automatically recover from broken locators using local AI (Ollama). It enables BDD-style test authoring with Reqnroll and runs on .NET 9 with Selenium WebDriver and NUnit, supporting either Ollama or GPT for healing.

How This Skill Works

The skill analyzes failing locators and leverages AI to propose alternative selectors, enabling automatic recovery of broken tests. Tests are authored in Gherkin via Reqnroll (BDD), then executed with .NET 9 + Selenium WebDriver + NUnit, using local Ollama or GPT to perform the self-healing during test runs.

When to Use It

  • Element locators break after UI updates and cause test failures
  • Flaky tests due to dynamic page content or changing IDs/classes
  • You want to enable auto-healing with a local AI (Ollama) or cloud GPT
  • Developing with Reqnroll BDD (Gherkin syntax) in a .NET 9 environment
  • Need to repair a specific failing locator in an existing test (e.g., By.Id('searchBox'))

Quick Start

  1. Step 1: Install Ollama AI using 'ollama pull qwen3-coder:480b-cloud'
  2. Step 2: Clone the repository and navigate to the Net9 project with 'git clone https://github.com/aiqualitylab/SeleniumSelfHealing.Reqnroll.git' and 'cd SeleniumSelfHealing.Reqnroll.Net9'
  3. Step 3: Run the tests with 'dotnet test'

Best Practices

  • Prefer stable locators and use AI healing as a fallback rather than the primary strategy
  • Run Ollama locally and validate AI-proposed locators before committing changes
  • Write clear Gherkin scenarios with Given/When/Then to align with Reqnroll
  • Isolate healing-enabled flows to quickly identify when a locator needs repair
  • Regularly re-run tests after UI changes to confirm healed locators remain valid

Example Use Cases

  • Generate a self-healing Selenium test for a login page that navigates to the URL, enters credentials, submits, and uses self-healing locators
  • Fix a failing locator like By.Id('searchBox') by letting the AI analyze the page and suggest alternatives
  • Run a test suite locally using Ollama to auto-heal locators on UI changes
  • Create a Reqnroll BDD feature file for a search workflow with self-healing steps
  • Repair a locator in a page with dynamic IDs/classes and confirm healing suggestions via CI

Frequently Asked Questions

Add this skill to your agents

Related Skills

Sponsor this space

Reach thousands of developers