
Webapp Testing
Reuse small Playwright helpers—wait loops, console capture, and timestamped screenshots—when agents or scripts stabilize flaky webapp tests.
Overview
Webapp Testing is an agent skill for the Ship phase that supplies Playwright helper utilities for waiting on conditions, logging console output, and saving screenshots.
Install
npx skills add https://github.com/github/awesome-copilot --skill webapp-testingWhat is this skill?
- waitForCondition polls a predicate with configurable timeout and interval (defaults 5000ms / 100ms)
- captureConsoleLogs attaches a page listener and stores type, text, and ISO timestamps
- captureScreenshot saves full-page PNGs with auto-generated timestamped filenames
- 3 exported helper functions: waitForCondition, captureConsoleLogs, captureScreenshot
Adoption & trust: 10.9k installs on skills.sh; 34.6k GitHub stars; 2/3 security scanners passed (skills.sh audits).
What problem does it solve?
Your Playwright tests flake on timing, hide console errors, or lack screenshots when something fails in the browser.
Who is it for?
Builders already running Playwright who want lightweight debug and stability helpers without a new testing framework.
Skip if: Greenfield projects with no Playwright setup, or teams needing full exploration or MCP-based site mapping in the same package.
When should I use this skill?
You are writing or fixing Playwright webapp tests and need wait, console, or screenshot utilities.
What do I get? / Deliverables
You get drop-in async helpers that make waits explicit, preserve console traces, and produce named full-page screenshots during test runs.
- Reusable helper functions integrated into Playwright specs
- Timestamped screenshot files and structured console log arrays
Recommended Skills
Journey fit
Ship/testing is the natural home for shared Playwright utilities that support assertion timing and debug artifacts during test runs. Testing subphase covers helper code that improves reliability and observability of browser tests, not production feature work.
How it compares
Utility snippets for existing Playwright specs, not a replacement for MCP exploration or codegen-first test authoring.
Common Questions / FAQ
Who is webapp-testing for?
Solo developers writing Playwright E2E tests who want small, copy-paste-ready helpers for waits, logs, and screenshots.
When should I use webapp-testing?
During Ship/testing while stabilizing flaky UI tests or improving failure artifacts in local runs and CI.
Is webapp-testing safe to install?
It is local test helper code with no declared network calls; still review the Security Audits panel on this Prism page before use.
SKILL.md
READMESKILL.md - Webapp Testing
/** * Helper utilities for web application testing with Playwright */ /** * Wait for a condition to be true with timeout * @param {Function} condition - Function that returns boolean * @param {number} timeout - Timeout in milliseconds * @param {number} interval - Check interval in milliseconds */ async function waitForCondition(condition, timeout = 5000, interval = 100) { const startTime = Date.now(); while (Date.now() - startTime < timeout) { if (await condition()) { return true; } await new Promise(resolve => setTimeout(resolve, interval)); } throw new Error('Condition not met within timeout'); } /** * Capture browser console logs * @param {Page} page - Playwright page object * @returns {Array} Array of console messages */ function captureConsoleLogs(page) { const logs = []; page.on('console', msg => { logs.push({ type: msg.type(), text: msg.text(), timestamp: new Date().toISOString() }); }); return logs; } /** * Take screenshot with automatic naming * @param {Page} page - Playwright page object * @param {string} name - Base name for screenshot */ async function captureScreenshot(page, name) { const timestamp = new Date().toISOString().replace(/[:.]/g, '-'); const filename = `${name}-${timestamp}.png`; await page.screenshot({ path: filename, fullPage: true }); console.log(`Screenshot saved: ${filename}`); return filename; } module.exports = { waitForCondition, captureConsoleLogs, captureScreenshot }; --- name: webapp-testing description: Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs. --- # Web Application Testing This skill enables comprehensive testing and debugging of local web applications using Playwright automation. You should use the Playwright MCP Server to undertake the work if possible. If the MCP Server is unavailable, you can run the code in a local Node.js environment with Playwright installed. ## When to Use This Skill Use this skill when you need to: - Test frontend functionality in a real browser - Verify UI behavior and interactions - Debug web application issues - Capture screenshots for documentation or debugging - Inspect browser console logs - Validate form submissions and user flows - Check responsive design across viewports ## Prerequisites - Node.js installed on the system - A locally running web application (or accessible URL) - Playwright will be installed automatically if not present ## Core Capabilities ### 1. Browser Automation - Navigate to URLs - Click buttons and links - Fill form fields - Select dropdowns - Handle dialogs and alerts ### 2. Verification - Assert element presence - Verify text content - Check element visibility - Validate URLs - Test responsive behavior ### 3. Debugging - Capture screenshots - View console logs - Inspect network requests - Debug failed tests ## Usage Examples ### Example 1: Basic Navigation Test ```javascript // Navigate to a page and verify title await page.goto("http://localhost:3000"); const title = await page.title(); console.log("Page title:", title); ``` ### Example 2: Form Interaction ```javascript // Fill out and submit a form await page.fill("#username", "testuser"); await page.fill("#password", "password123"); await page.click('button[type="submit"]'); await page.waitForURL("**/dashboard"); ``` ### Example 3: Screenshot Capture ```javascript // Capture a screenshot for debugging await page.screenshot({ path: "debug.png", fullPage: true }); ``` ## Guidelines 1. **Always verify the app is running** - Check that the local server is accessible before running tests 2. **Use explicit waits** - Wait for elements or navigation to complete before interacting 3. **Capture screenshots on failure** - Take screenshots to help debug issues 4. **Clean up resources** - Always close the browser