CodeVetter
← All unpacks
CodeVetter · Repo Unpack evidence

microsoft/playwright

Scanned commit b630e71fcd dated 2026-10-01 — last upstream commit. Generated by codevetter 1.15.0 on 2026-10-02.

github.com/microsoft/playwright ↗ · 2660 files · 26.6 MB

🎭 Playwright Documentation | API reference Playwright is a framework for web automation and testing.

Deep analysis by cli:codex via the codex CLI on 2026-10-02 (497s) — every claim below links to its cited source files. Source inspection; upstream code and tests were not executed.

Overview

Playwright is a Node.js browser automation and testing monorepo for developers writing browser scripts, end-to-end tests, and agent-driven automation. At commit b630e71fcda7885885c459bcbb88e5bfa7c0a1ac, it combines a client/server automation engine, a parallel test runner, browser installation tooling, reporting and trace interfaces, and CLI/MCP browser tools. Its distinctive architecture carries typed commands through validated protocol dispatchers to browser implementations and injected page scripts.

System map

The repository separates browser automation, test orchestration, protocol definitions, and browser-facing interfaces into workspace packages. Local automation still crosses a client/dispatcher boundary before reaching browser implementations. Persistent state consists of browser profiles, browser installation caches, and explicit JSON/artifact files. The inspected deployment surfaces are Node packages, command-line programs, and optional browser-control servers.

Feature catalog

The inspected public surfaces span browser automation, test execution, artifact inspection, and agent tools. Test execution exposes filtering, sharding, retries, debugging, and interactive UI options. Browser tooling includes installation, recording, screenshots, PDFs, and remote connections. These eight groups describe implemented command and API families; they are not an exhaustive method inventory.

Data flow

Commands enter through CLI parsing or client APIs and are normalized before reaching execution owners. Protocol messages carry object identities, parameters, timeouts, and metadata, with validation on both dispatch and response paths. Test state flows through project phases and workers to reporters and persisted selection metadata. Browser storage travels between injected page code, server context state, and client-owned JSON files.

Behavior traces

Four concrete flows were followed through source: test startup/execution, browser launch, locator click, and storage save/restore. The traces below preserve execution order and significant conditions. Error handling, force behavior, and reuse modes change these paths. They describe source behavior rather than observed runtime executions.

Testing signals

Tests and CI were inspected, not executed; no passing result or coverage percentage is claimed. The repository uses Playwright fixtures for browser behavior and a stable runner for testing its own runner. Inspected specifications exercise success, failure, persistence, authentication redirects, and report rendering. Coverage observations are bounded to the files and ranges read, with explicit platform exclusions and CI trigger limits.

Risk map

The inspected code intentionally exercises powerful host, browser, network, and filesystem capabilities. The observations below identify trust boundaries and maintenance-sensitive branches, not confirmed vulnerabilities. Some controls are explicitly configurable or bypassed in trusted modes. Test exclusions and asynchronous cleanup are source-level limitations, not evidence of a failing implementation.

Extension points

The repository provides concrete registries, factories, and schemas for extending behavior. Some are public configuration surfaces, while others are internal integration seams. Protocol and generated-type changes require coordinated edits across boundaries. Browser engines and injected selector behavior have explicit synchronization requirements.

Contributor handoff

Start with the owning package and follow the relevant client/protocol/server or runner/worker boundary. Preserve generated-source ownership, dependency rules, and platform-specific behavior. Tests and CI were inspected, not executed, and this inventory is bounded rather than exhaustive. The commands below are future validation pointers; the current read-only investigation did not run them.

Languages

LanguageFilesShare of source
TypeScript138685%
HTML310docs/config
Markdown279docs/config
JavaScript18111%
CSS94docs/config
JSON70docs/config
YAML60docs/config
Shell342%

Start reading here

Probable source entrypoint: packages/ — inferred from the directory tree and manifest, not the upstream docs.

Source roots

packages/ (1065 files)

Repository structure

Top-level pathFiles
tests/1094
packages/1065
docs/181
browser_patches/95
utils/83
examples/71
.github/38
.claude/16

Docs found: CLAUDE.mdCONTRIBUTING.mdREADME.mddocs/src/accessibility-testing-java.mddocs/src/accessibility-testing-js.mddocs/src/actionability.mddocs/src/api-testing-csharp.mddocs/src/api-testing-java.mddocs/src/api-testing-js.mddocs/src/api-testing-python.md

Package

package.json — playwright-internal v1.64.0-next, 80 declared dependencies.

@actions/core@actions/github@babel/code-frame@babel/core@babel/helper-plugin-utils@babel/parser@babel/plugin-proposal-decorators@babel/plugin-syntax-async-generators@babel/plugin-syntax-import-attributes@babel/plugin-syntax-json-strings@babel/plugin-syntax-object-rest-spread@babel/plugin-syntax-optional-catch-binding

CI & config entrypoints

Structural health signals

Average score 6.3/10 across 96 analyzed source files; 58 hotspots surfaced.

These are deterministic review leads — size, churn, and structural signals — not proof of a bug in this project.

Recent history