playwright-blazor-testing

Automates end-to-end UI tests for Blazor apps with Playwright.

57|7|Updated Aug 6, 2025
One-click install
npx skills add https://github.com/seiggy/lucia-dotnet --skill playwright-blazor-testing-seiggy
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: playwright-blazor-testing
Source: https://github.com/seiggy/lucia-dotnet/tree/main/.github/skills/playwright-blazor
Command: npx skills add https://github.com/seiggy/lucia-dotnet --skill playwright-blazor-testing-seiggy

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill streamlines the process of writing robust end-to-end UI tests for Blazor applications, ensuring their reliability and catching regressions early.

Core Features & Use Cases

  • Comprehensive Blazor Testing: Covers navigation, component interaction, authentication, and Blazor-specific patterns.
  • Stable Selectors: Emphasizes using data-test attributes for resilient tests.
  • Use Case: Automatically verify that a user can successfully log in, navigate through different sections of a Blazor app, and submit a form, capturing screenshots at each step.

Quick Start

Use the playwright-blazor-testing skill to write UI tests for your Blazor application.

Frequently Asked Questions about playwright-blazor-testing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate end-to-end UI testing for Blazor WebAssembly applications?

Automate end-to-end UI testing for Blazor WebAssembly applications using Playwright to handle navigation, component interaction, and authentication. You can write robust tests using MSTest or xUnit to verify user flows and capture regressions early.

Can Playwright handle SignalR connections when testing Blazor Server apps?

Playwright can handle Blazor Server testing, including specific patterns like SignalR connections and error handling. It automates browser interactions to validate real-time UI updates and component behavior driven by the server connection.

What is the best way to select elements in Blazor UI tests to avoid breaking?

The best way to select elements in Blazor UI tests is using `data-test` attributes. This approach provides stable selectors that remain resilient to DOM changes and CSS class updates, ensuring your end-to-end tests do not break unexpectedly.

Do I need specific NuGet packages to write Blazor UI tests with Playwright?

Yes, you need specific NuGet packages for MSTest or xUnit to write Blazor UI tests with Playwright. You also need to install the Playwright browser binaries to execute the end-to-end testing automation locally or in CI.

Why use Playwright for Blazor testing instead of other UI automation tools?

Use Playwright for Blazor testing to reliably automate complex web scenarios like form submissions and authentication. It specializes in end-to-end UI automation across Blazor Server and WebAssembly, capturing screenshots and handling dynamic content effectively.