selenium-ui-test-generator

Solid

Generates Selenium WebDriver tests for React/Angular front-ends with STRICT loop prevention. Triggers on: "test UI", "generate Selenium tests", "test React app", "create E2E tests", "test front-end". WARNING: UI tests cost 3x more than unit tests -- generate selectively.

Web & Frontend 7 stars 3 forks Updated today MIT

Install

View on GitHub

Quality Score: 81/100

Stars 20%
30
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Selenium UI Test Generator **Cost warning:** UI tests cost 30-50 credits each (vs. 10-15 for unit tests). Always inform the user of this before generating. ## Instructions ### Step 1: Flow Selection Ask the user to pick **2-3 critical flows maximum** (e.g., login, form submission, checkout). Provide cost comparison so they can make an informed choice. ### Step 2: Get Selectors Upfront **This is critical for avoiding wasted iterations.** Ask the user to provide: 1. `data-testid` attributes (preferred) 2. Or element IDs/classes from browser dev tools Without real selectors, tests will likely fail and waste credits. If the user cannot provide selectors, warn them of the higher failure risk before proceeding. See `references/react-testid-guide.md` for the recommended `data-testid` pattern. Load selectors from `assets/selectors-config.json` when available. ### Step 3: Generate ONE Test at a Time Unlike unit/API skills, generate only **1 UI test per iteration** due to the high cost. Use explicit waits and `data-testid` selectors: ```java @Test void testUserLogin() { driver.get("http://localhost:3000/login"); WebDriverWait wait = new WebDriverWait(driver, Duration.ofSeconds(10)); wait.until(ExpectedConditions.presenceOfElementLocated( By.cssSelector("[data-testid='login-form']") )); driver.findElement(By.cssSelector("[data-testid='username-input']")) .sendKeys("testuser@example.com"); driver.findElement(By.cssSelector("[data-tes...

Details

Author
timwukp
Repository
timwukp/agent-skills-best-practice
Created
4 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category