Agent skill · software engineering · aaronontheweb
playwright-blazor-testing
Write UI tests for Blazor applications (Server or WebAssembly) using Playwright. Covers navigation, interaction, authentication, selectors, and common Blazor-specific patterns.
Why this skill is useful
Provides specific patterns and commands for testing Blazor applications with Playwright that the AI wouldn't reliably generate on its own.
What it needs
Requires playwright installed locally. About 7k tokens when loaded. Last updated 2026-07-03. 1,095 stars on the source repository.
What this skill does
Testing Blazor Applications with Playwright When to Use This Skill Use this skill when: Writing end-to-end UI tests for Blazor Server or WebAssembly applications Testing interactive components, forms, and user workflows Verifying authentication and authorization flows Testing SignalR-based real-time updates in Blazor Server Capturing screenshots for visual regression testing Testing responsive designs and mobile emulation Debugging UI issues with browser developer tools Core Principles 1. Wait for Rendering - Blazor renders asynchronously; use proper wait strategies 2. Test Attributes - Use data-test or data-testid attributes for stable selectors 3. Headless by Default - Run tests headless in CI, headed for local debugging 4. Handle Error UI - Always check for #blazor-error-ui to catch unhandled exceptions 5. Avoid Network Wait States - Blazor navigation doesn't trigger network loads; wait for DOM changes 6. Pin Browser Channels - Use specific browser channels (msedge, chrome) for reproducibility Required NuGet Packages Installation Before running tests, install Playwright browsers: Pattern 1: Basic Playwright Setup Pattern 2: Navigation in Blazor Apps Initial Page Load (Classic Navigation) In-App Navigation (No Page Reload) Blazor uses client-side routing, so subsequent navigations don't trigger page reloads: Wait Strategies for Blazor Pattern 3: Stable Selectors with Test Attributes In Your Blazor Components In Your Tests Pattern 4: Handling Authentication Interactive Login Cookie Injection (Faster) OAuth/External Provider Mocking Pattern 5: Click Events and Touch Interactions Pattern 6: Form Handling Pattern 7: Handling Blazor Error UI Blazor shows an error overlay when unhandled exceptions occur. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills aaronontheweb/playwright-blazor