Skip to content
aaronontheweb avatar

Playwright Blazor Testing

Playwright-driven UI testing for Blazor Server and WebAssembly apps, covering navigation, auth, and selectors.

CCM score
55 of 100
skills.sh installs
582
GitHub stars
1.3K
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers navigation between pages, form interaction, authentication flows, selector strategies, and Blazor-specific wait patterns
  • Includes C# setup patterns for a Playwright fixture, cookie-based auth injection, and OAuth redirect mocking via route interception
  • Enforces waiting on DOM changes rather than network idle, since Blazor client-side navigation does not trigger page loads
  • Designed for teams writing end-to-end UI tests for Blazor applications in MSTest or xUnit

Install

$ npx -y skills add aaronontheweb/dotnet-skills --skill playwright-blazor-testing -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

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

Details

Repository
github.com/aaronontheweb/dotnet-skills
Categories
Testing & QA, .NET & C#
First seen
Jun 3, 2026

Questions

What does the playwright-blazor-testing skill do?

It writes UI tests for Blazor applications, both Server and WebAssembly, using Playwright. It covers navigation, interaction, authentication, selectors, and common Blazor-specific patterns such as waiting for rendering and checking the blazor-error-ui element.

How do I install the playwright-blazor-testing skill?

Run npx -y skills add aaronontheweb/dotnet-skills --skill playwright-blazor-testing -y in a project. After that, the agent can write Playwright UI tests for your Blazor app, using the Microsoft.Playwright NuGet packages and the install step for browsers.

Which skills sit alongside playwright-blazor-testing in the Testing and QA category?

It is listed in the Testing and QA category on Claude Marketplaces, next to tdd, migrate-to-shoehorn, test-driven-development, webapp-testing and break-ui. Its focus is end-to-end UI testing of Blazor pages rather than general test-driven development.

What does the skill need before tests will run?

The skill expects the Microsoft.Playwright and Microsoft.Playwright.MSTest or xunit packages in the project. Playwright browsers must be installed first with pwsh -Command playwright install --with-deps.

More from aaronontheweb/dotnet-skills

All 34

Similar to Playwright Blazor Testing

More Testing & QA