github/awesome-copilot / skills/webapp-testing
webapp-testing
VerifiedToolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 3.7 KB |
| assets/test-helper.js | script | 1.5 KB |
assets/test-helper.js
View on GitHub/**
* 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
};
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |