webapp-testing

Browser-based testing and debugging toolkit for web applications using Playwright. Use when verifying frontend behavior, capturing screenshots, inspecting browser logs, or debugging UI issues in local...

Namewebapp-testing
Version1.0.0
Authorseekthought
Tagstesting webapp playwright debugging screenshots
CompatibilityRequires Node.js and Playwright. Dependencies are auto-installed if missing.

安装

skillctl install -r skillhub webapp-testing

Web Application Testing Skill

This skill provides browser-based testing and debugging for local or accessible web applications using Playwright.

Execution Constraints


When to Use This Skill

Use this skill when you need to:


Prerequisites

Runtime Environment

Dependency Detection Rules

Before executing any browser automation:

  1. Check that Node.js is available.
  2. Detect whether Playwright is already installed in the project.
  3. Install Playwright only if it is not present.

Example Checks

node -v
npm ls @playwright/test
pnpm ls @playwright/test

Core Capabilities

Browser Automation

Verification

Debugging


Usage Examples

Basic Navigation

await page.goto("http://localhost:3000");
const title = await page.title();
console.log(title);

Form Submission

await page.fill("#username", "testuser");
await page.fill("#password", "password123");
await page.click('button[type="submit"]');
await page.waitForURL("**/dashboard");

Screenshot Capture

await page.screenshot({ path: "debug.png", fullPage: true });

Recommended Agent Execution Flow

  1. Verify the application is reachable
  2. Detect required dependencies
  3. Install missing dependencies only if necessary
  4. Launch browser automation
  5. Execute interaction and verification steps
  6. Capture evidence on failure
  7. Close browser resources

Common Patterns

Wait for Element

await page.waitForSelector("#element-id", { state: "visible" });

Check Element Existence

const exists = (await page.locator("#element-id").count()) > 0;

Capture Console Logs

page.on("console", (msg) => {
  console.log("[browser]", msg.text());
});

Error Handling with Evidence

try {
  await page.click("#submit");
} catch (error) {
  await page.screenshot({ path: "error.png" });
  throw error;
}

Guidelines


Limitations