/vibe:ghcopilot-instr-playwright-dotnetfrom vibe
Provides Playwright .NET test writing guidelines including locator strategies, web-first assertions, test structure, and file organization. Useful when writing or reviewing Playwright tests in C#.
Ships in vibe. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
GetByRole, GetByLabel, GetByText, etc.) for resilience and accessibility. Use await Test.StepAsync() to group interactions and improve test readability and reporting.Expect() from Playwright assertions (e.g., await Expect(locator).ToHaveTextAsync()). Avoid checking visibility unless specifically testing for visibility changes.using Microsoft.Playwright; and either using Microsoft.Playwright.Xunit; or using Microsoft.Playwright.NUnit; or using Microsoft.Playwright.MSTest; for MSTest.PageTest (available in NUnit, xUnit, and MSTest packages) or use IClassFixture<PlaywrightFixture> for xUnit with custom fixtures. Group related tests for a feature in the same test class.[SetUp] (NUnit), [TestInitialize] (MSTest), or constructor initialization (xUnit) for setup actions common to all tests (e.g., navigating to a page).[Test] for NUnit, [Fact] for xUnit, [TestMethod] for MSTest) with descriptive method names following C# naming conventions (e.g., SearchForMovieByTitle).Tests/ directory or organize by feature.<FeatureOrPage>Tests.cs (e.g., LoginTests.cs, SearchTests.cs).ToMatchAriaSnapshotAsync to verify the accessibility tree structure of a component. This provides a comprehensive and accessible snapshot.ToHaveCountAsync to assert the number of elements found by a locator.ToHaveTextAsync for exact text matches and ToContainTextAsync for partial matches.ToHaveURLAsync to verify the page URL after an action.using Microsoft.Playwright;
using Microsoft.Playwright.Xunit;
using static Microsoft.Playwright.Assertions;
namespace PlaywrightTests;
public class MovieSearchTests : PageTest
{
public override async Task InitializeAsync()
{
await base.InitializeAsync();
// Navigate to the application before each test
await Page.GotoAsync("https://debs-obrien.github.io/playwright-movies-app");
}
[Fact]
public async Task SearchForMovieByTitle()
{
await Test.StepAsync("Activate and perform search", async () =>
{
await Page.GetByRole(AriaRole.Search).ClickAsync();
var searchInput = Page.GetByRole(AriaRole.Textbox, new() { Name = "Search Input" });
await searchInput.FillAsync("Garfield");
await searchInput.PressAsync("Enter");
});
await Test.StepAsync("Verify search results", async () =>
{
// Verify the accessibility tree of the search results
await Expect(Page.GetByRole(AriaRole.Main)).ToMatchAriaSnapshotAsync(@"
- main:
- heading ""Garfield"" [level=1]
- heading ""search results"" [level=2]
- list ""movies"":
- listitem ""movie"":
- link ""poster of The Garfield Movie The Garfield Movie rating"":
- /url: /playwright-movies-app/movie?id=tt5779228&page=1
- img ""poster of The Garfield Movie""
- heading ""The Garfield Movie"" [level=2]
");
});
}
}
dotnet test or using the test runner in your IDEBefore finalizing tests, ensure:
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Playwright, C#, .NET
npx claudepluginhub anubhavg-icpl/vibe --plugin vibe5,304 skills in this plugin
/3d-pipelineChoose a 3D generation or reconstruction pipeline given input type, output format, and use case. Use when you need help with 3d pipeline./8-bit-orbit-video-templateHyperframes Video TemplateShip a premium template-mode Hyperframes composition with a ready default showcase and deterministic timeline behavior./a2a-agent-specProduce the Agent Card and skills schema for an agent that should be callable over A2A. Use when you need help with a2a agent spec.Other plugins' skills for the same job