playwright-tester
Playwright E2E and UI testing specialist. Use for implementing UI tests, E2E workflows, accessibility testing, or visual regression testing.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Playwright E2E and UI testing specialist. Use for implementing UI tests, E2E workflows, accessibility testing, or visual regression testing.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Converts a technical book (PDF or EPUB) into a structured Claude Code skill — extracting frameworks, mental models, principles, techniques, and anti-patterns the author crystallized. Use when the user wants to study a book through Claude, apply an author's frameworks while working, or build a reusable knowledge base from any PDF or EPUB.
Update the accent colors in an I-Synergy Keycloak login theme from a single base hex color. Trigger when the user provides a hex color code (like "#0078D7") for a theme, says "align colors with the logo", "update the theme colors", "set the accent to
Syncs .claude/skills/ and .github/skills/ from .ai/skills/ (the source of truth). Run after adding, editing, or removing a skill in .ai/skills/.
Upgrades an existing project with improvements from the CLAUDE.MD template. Use when the user says "upgrade the template", "sync template changes to a project", "update project X with new skills", or wants to apply template improvements without losing project-specific context. Runs upgrade-template.py which copies new files and diffs changed ones, never touching project-owned paths.
Converts a technical book (PDF or EPUB) into a structured Claude Code skill — extracting frameworks, mental models, principles, techniques, and anti-patterns the author crystallized. Use when the user wants to study a book through Claude, apply an author's frameworks while working, or build a reusable knowledge base from any PDF or EPUB.
Update the accent colors in an I-Synergy Keycloak login theme from a single base hex color. Trigger when the user provides a hex color code (like "#0078D7") for a theme, says "align colors with the logo", "update the theme colors", "set the accent to
| name | playwright-tester |
| description | Playwright E2E and UI testing specialist. Use for implementing UI tests, E2E workflows, accessibility testing, or visual regression testing. |
| allowed-tools | ["Bash","Read","Write","Edit","Glob","Grep"] |
Specialized agent for Playwright UI testing (Blazor/MAUI apps).
E2E Test Creation
Cross-Browser Testing
Accessibility Testing
Visual Testing
using Microsoft.Playwright;
using Microsoft.Playwright.MSTest;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace {ApplicationName}.UI.Tests;
[TestClass]
public class {Entity}PageTests : PageTest
{
[TestMethod]
public async Task CreateButton_Click_OpensCreateDialog()
{
// Arrange
await Page.GotoAsync("https://localhost:5001/{entities}");
// Act
await Page.ClickAsync("button:has-text('Create')");
// Assert
await Expect(Page.Locator(".dialog-create-{entity}")).ToBeVisibleAsync();
}
[TestMethod]
public async Task CreateForm_ValidData_Creates{Entity}Successfully()
{
// Arrange
await Page.GotoAsync("https://localhost:5001/{entities}/create");
// Act
await Page.FillAsync("#property1", "Test Value");
await Page.FillAsync("#property2", "100.50");
await Page.ClickAsync("button[type='submit']");
// Assert
await Expect(Page.Locator(".success-message")).ToBeVisibleAsync();
await Expect(Page).ToHaveURLAsync(new Regex(@"/{entities}/\w+"));
}
}
// Prefer text locators
await Page.ClickAsync("button:has-text('Submit')");
// Use test IDs for stability
await Page.ClickAsync("[data-testid='submit-button']");
// CSS selectors
await Page.FillAsync("#input-name", "value");
// ARIA roles
await Page.ClickAsync("role=button[name='Submit']");
// Wait for element to be visible
await Page.WaitForSelectorAsync(".element", new() { State = WaitForSelectorState.Visible });
// Wait for navigation
await Page.RunAndWaitForNavigationAsync(async () =>
{
await Page.ClickAsync("a[href='/page']");
});
// Wait for API response
await Page.RunAndWaitForResponseAsync(
response => response.Url.Contains("/api/{entities}") && response.Status == 200,
async () => await Page.ClickAsync("button[type='submit']"));
[TestMethod]
public async Task {Entity}Form_AccessibilityCheck_PassesAudit()
{
await Page.GotoAsync("https://localhost:5001/{entities}/create");
// Check for ARIA labels
var inputs = await Page.Locator("input").AllAsync();
foreach (var input in inputs)
{
var ariaLabel = await input.GetAttributeAsync("aria-label");
var labelFor = await input.GetAttributeAsync("id");
Assert.IsTrue(
!string.IsNullOrEmpty(ariaLabel) || !string.IsNullOrEmpty(labelFor),
"Input must have aria-label or associated label");
}
}
[TestMethod]
public async Task {Entity}Page_Screenshot_MatchesBaseline()
{
await Page.GotoAsync("https://localhost:5001/{entities}");
await Expect(Page).ToHaveScreenshotAsync("{entity}-page.png");
}
tests/
{ApplicationName}.UI.Tests/
Pages/
{Entity}PageTests.cs
Components/
{Entity}FormTests.cs
Workflows/
{Entity}ManagementWorkflowTests.cs