一键导入
playwright-auto-bootstrap
Make .NET/xUnit Playwright integration tests self-install missing Chromium browsers and skip cleanly if bootstrap cannot complete.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Make .NET/xUnit Playwright integration tests self-install missing Chromium browsers and skip cleanly if bootstrap cannot complete.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
{what this skill teaches agents}
Build real git source, bare remote, and local clone fixtures for CopilotBooster integration tests.
{what this skill teaches agents}
Reusable WinForms pattern for textboxes that accept either a bare GitHub PR/Issue number or a full github.com URL.
Core conventions and patterns for this codebase
Isolate tests for services that write under %LOCALAPPDATA% without touching the real user profile.
| name | playwright-auto-bootstrap |
| description | Make .NET/xUnit Playwright integration tests self-install missing Chromium browsers and skip cleanly if bootstrap cannot complete. |
Use this when Playwright integration tests fail locally or in CI with Microsoft.Playwright.PlaywrightException messages such as Executable doesn't exist or Please run ... playwright install.
[Collection("PlaywrightBootstrap")].ICollectionFixture<T> fixture that runs once per test process.InitializeAsync, guard with a static SemaphoreSlim and static bool so parallel discovery/classes do not install browsers more than once.using var playwright = await Playwright.CreateAsync().ConfigureAwait(false);
await using var browser = await playwright.Chromium.LaunchAsync(new() { Headless = true }).ConfigureAwait(false);
var exitCode = Microsoft.Playwright.Program.Main(["install", "chromium"]);
Assert.Skip(...) so environmental gaps do not red-bar the suite.playwright install chromium step; it remains idempotent and makes the fixture a fast probe.chromium also provides the headed executable; headless tests use the headless shell cache.