agentleFS
MicrosoftKnown publishermicrosoft/playwright-dotnet/CLAUDE.md

playwright-dotnet

CLAUDE.md3k starsChanged 5 months agoMITView on GitHub

Follow .github/workflows/tests.yml for the canonical sequence. Tests take ~8 minutes. Always save output to a file and grep from there: Before committing, run dotnet format ./src/ -v:diag and fix style issues. Semantic commit messages: label(scope): description Labels: fix, feat, chore, docs, test, devops Never add Co-Authored-By agents in commit message. Never add "Generated with" in commit message. Never add test plan to PR description. Keep PR description short — a few bullet points at most. Branch naming for issue fixes:…

  • Commits and pushes

Trending

Quiet since August.about the whole repository

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 0 mentionsApr 2026: 0 mentionsMay 2026: 0 mentionsJun 2026: 0 mentionsJul 2026: 0 mentionsAug 2026: 1 mentionSep 2026: 0 mentionsOct 2026: 0 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the microsoft/playwright-dotnet repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about microsoft/playwright-dotnet

The biggest 5 of 31 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 31

Talked about on GitHub and Hacker News (31 times).

On GitHub · 30

25 more on GitHub

On Hacker News · 1

The file

We split this CLAUDE.md into the rules it gives an agent

7 rules. About 0 are common, 1 is distinctive, and 6 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Follow .github/workflows/tests.yml for the canonical sequence.

    line 12
  2. Very specific:

    All Playwright objects extend ChannelOwner and communicate via SendMessageToServerAsync.

    line 41
  3. Very specific:

    Before committing, run dotnet format ./src/ -v:diag and fix style issues.

    line 48
  4. Very specific:

    Never add Co-Authored-By agents in commit message.

    line 76
  5. Very specific:

    Never add "Generated with" in commit message.

    line 77
  6. Very specific:

    Never add test plan to PR description.

    line 78
  7. Distinctive:

    Do not include "co-authored" block in the commit message.

    line 82

≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

Playwright .NET

Building

./build.sh --download-driver   # download the Playwright driver (needs Node.js/npm on PATH)
dotnet build ./src              # build the entire solution

Running tests

Follow .github/workflows/tests.yml for the canonical sequence.

# Install browsers (pick one: chromium, firefox, webkit)
pwsh src/Playwright/bin/Debug/netstandard2.0/playwright.ps1 install --with-deps chromium

# Run tests
BROWSER=chromium dotnet test ./src/Playwright.Tests/Playwright.Tests.csproj -c Debug -f net8.0 --logger:"console;verbosity=detailed"

Tests take ~8 minutes. Always save output to a file and grep from there:

BROWSER=chromium dotnet test ./src/Playwright.Tests/Playwright.Tests.csproj \
  -c Debug -f net8.0 --logger:"console;verbosity=detailed" > /tmp/test-results.txt 2>&1
grep "^  Failed" /tmp/test-results.txt        # list failures
tail -5 /tmp/test-results.txt                  # summary

Architecture

Generated vs hand-written code

  • Public API interfaces (e.g. src/Playwright/API/Generated/IPage.cs) are generated by ../playwright/utils/doclint/generateDotnetApi.js from the upstream API docs. Do not hand-edit these — update the generator instead.
  • The generator uses classNameMap for type mappings (e.g. Disposable → IAsyncDisposable, boolean → bool). Add entries there when a Playwright type should map to a different .NET type.
  • The generator skips generating interface files for types like TimeoutException and IAsyncDisposable that map to built-in .NET types.
  • Supplement interfaces (src/Playwright/API/Supplements/) are hand-written and extend the generated interfaces with .NET-specific overloads.
  • Internal implementations live in src/Playwright/Core/ (namespace Microsoft.Playwright.Core). These implement both the generated and supplement interfaces.

Key patterns

  • All Playwright objects extend ChannelOwner and communicate via SendMessageToServerAsync.
  • Connection.cs has a factory switch that creates the right ChannelOwner subclass based on ChannelOwnerType.
  • New channel object types require: enum entry in ChannelOwnerType.cs, case in Connection.cs, initializer in Transport/Protocol/Generated/, and a Core/ class.
  • Public APIs should use .NET standard types (e.g. IAsyncDisposable) not custom Playwright types. Internal helpers (e.g. Disposable class in Core/) stay internal.

Commit Convention

Before committing, run dotnet format ./src/ -v:diag and fix style issues.

Semantic commit messages: label(scope): description

Labels: fix, feat, chore, docs, test, devops

git checkout -b fix-39562
# ... make changes ...
git add <changed-files>
git commit -m "$(cat <<'EOF'
fix(proxy): handle SOCKS proxy authentication

Fixes: https://github.com/microsoft/playwright/issues/39562
EOF
)"
git push origin fix-39562
gh pr create --repo microsoft/playwright --head username:fix-39562 \
  --title "fix(proxy): handle SOCKS proxy authentication" \
  --body "$(cat <<'EOF'
## Summary
- <describe the change very! briefly>

Fixes https://github.com/microsoft/playwright/issues/39562
EOF
)"

Never add Co-Authored-By agents in commit message. Never add "Generated with" in commit message. Never add test plan to PR description. Keep PR description short — a few bullet points at most. Branch naming for issue fixes: fix-<issue-number>

Commits

  • Do not include "co-authored" block in the commit message.

Rolling to a new Playwright version

See .claude/skills/playwright-roll/SKILL.md.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.