webapp-testing by github/awesome-copilot
npx skills add https://github.com/github/awesome-copilot --skill webapp-testing此技能支持使用 Playwright 自动化对本地 Web 应用程序进行全面的测试和调试。
如果可能,你应该使用 Playwright MCP 服务器来执行工作。如果 MCP 服务器不可用,你可以在已安装 Playwright 的本地 Node.js 环境中运行代码。
当你需要以下操作时,请使用此技能:
// Navigate to a page and verify title
await page.goto("http://localhost:3000");
const title = await page.title();
console.log("Page title:", title);
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
// 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");
// Capture a screenshot for debugging
await page.screenshot({ path: "debug.png", fullPage: true });
await page.waitForSelector("#element-id", { state: "visible" });
const exists = (await page.locator("#element-id").count()) > 0;
page.on("console", (msg) => console.log("Browser log:", msg.text()));
try {
await page.click("#button");
} catch (error) {
await page.screenshot({ path: "error.png" });
throw error;
}
在 test-helper.js 中提供了一些辅助函数,用于简化常见任务,如等待元素、捕获屏幕截图和处理错误。你可以在测试中导入并使用这些函数,以提高可读性和可维护性。
每周安装量
7.8K
代码仓库
GitHub 星标数
26.9K
首次出现
2026 年 1 月 20 日
安全审计
安装于
codex7.7K
gemini-cli7.7K
opencode7.7K
github-copilot7.6K
cursor7.6K
amp7.6K
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.
Use this skill when you need to:
// Navigate to a page and verify title
await page.goto("http://localhost:3000");
const title = await page.title();
console.log("Page title:", title);
// 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");
// Capture a screenshot for debugging
await page.screenshot({ path: "debug.png", fullPage: true });
await page.waitForSelector("#element-id", { state: "visible" });
const exists = (await page.locator("#element-id").count()) > 0;
page.on("console", (msg) => console.log("Browser log:", msg.text()));
try {
await page.click("#button");
} catch (error) {
await page.screenshot({ path: "error.png" });
throw error;
}
Some helper functions are available in test-helper.js to simplify common tasks like waiting for elements, capturing screenshots, and handling errors. You can import and use these functions in your tests to improve readability and maintainability.
Weekly Installs
7.8K
Repository
GitHub Stars
26.9K
First Seen
Jan 20, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykWarn
Installed on
codex7.7K
gemini-cli7.7K
opencode7.7K
github-copilot7.6K
cursor7.6K
amp7.6K
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
102,200 周安装