Repository navigation
Description
Version
@playwright/cli 0.1.25 (playwright-core 1.66.0-alpha-2026-11-18)
What happens
README.md's Configuration file schema and Configuration via env sections have drifted from the bundled playwright-core runtime (configFromEnv / resolveCLIConfigForCLI), and no test in tests/integration.spec.ts checks for drift:
-
Removed / stale
PLAYWRIGHT_MCP_*entries in "Configuration via env":PLAYWRIGHT_MCP_SAVE_TRACEandPLAYWRIGHT_MCP_SAVE_VIDEOdo not exist anywhere inplaywright-core/lib/coreBundleand are silently ignored byconfigFromEnv/resolveCLIConfigForCLI(tracing and video recording usetracing-start/tracing-stopandvideo-start/video-stop).PLAYWRIGHT_MCP_EXTENSIONstill references"Playwright MCP Bridge"instead of"Playwright Extension".PLAYWRIGHT_MCP_CAPSomitsdevtools,PLAYWRIGHT_MCP_CDP_TIMEOUTomits the30000msdefault, and active env vars read byconfigFromEnv/playwright-core(PLAYWRIGHT_MCP_BACKGROUND,PLAYWRIGHT_MCP_CODEGEN,PLAYWRIGHT_MCP_EXTENSION_TOKEN,PLAYWRIGHT_MCP_FILE_PATHS,PLAYWRIGHT_MCP_IDLE_TIMEOUT,PLAYWRIGHT_MCP_IMAGE_RESPONSES,PLAYWRIGHT_MCP_MOBILE,PLAYWRIGHT_MCP_NO_TAB_GROUP,PLAYWRIGHT_MCP_OUTPUT_MAX_SIZE,PLAYWRIGHT_MCP_PROFILE_DIR_NAME,PLAYWRIGHT_MCP_REDACT_URL_PARAMS,PLAYWRIGHT_MCP_REMOTE_HEADERS,PLAYWRIGHT_MCP_SESSION_COLOR,PLAYWRIGHT_MCP_TIMEOUT_SETTLE,PLAYWRIGHT_MCP_WEBMCP) are undocumented.
-
Removed / stale options in "Configuration file schema":
outputMode?: 'file' | 'stdout'was removed fromplaywright-core(0occurrences incoreBundle.js).saveVideo?: { width: number; height: number }is no longer read byconfigFromCLIOptionsor the tool runtime.codegen?: 'typescript' | 'none'omits'python' | 'java' | 'csharp', which the runtime accepts.- Active configuration options supported by
resolveCLIConfigForCLIand.playwright/cli.config.json(extension,tabGroup,sessionColor,background,webmcp,secrets,redactUrlParams,outputMaxSize,timeouts.expect/settle/idle,imageResponses,filePaths,snapshot,ignoreRoots,browser.remoteEndpointobject form) are missing.
Steps to reproduce
node -e '
const fs = require("fs");
const readme = fs.readFileSync("README.md", "utf8");
const envSection = readme.match(/<summary>Configuration via env<\/summary>([\s\S]*?)<\/details>/)[1];
const docEnvs = [...envSection.matchAll(/`(PLAYWRIGHT_MCP_[A-Z0-9_]+)`/g)].map(m => m[1]);
const core = fs.readFileSync(require.resolve("playwright-core/lib/coreBundle"), "utf8");
const runtimeEnvs = new Set(core.match(/\bPLAYWRIGHT_MCP_[A-Z0-9_]+\b/g) || []);
console.log("Unsupported in runtime:", docEnvs.filter(e => !runtimeEnvs.has(e)));
'Observed output on main:
Unsupported in runtime: [ 'PLAYWRIGHT_MCP_SAVE_TRACE', 'PLAYWRIGHT_MCP_SAVE_VIDEO' ]
Verifying runtime config resolution via tools.resolveCLIConfigForCLI:
node -e '
const { tools } = require("playwright-core/lib/coreBundle");
tools.resolveCLIConfigForCLI(".", "default", {}, {
PLAYWRIGHT_MCP_SAVE_TRACE: "true",
PLAYWRIGHT_MCP_SAVE_VIDEO: "800x600",
PLAYWRIGHT_MCP_CODEGEN: "python",
PLAYWRIGHT_MCP_WEBMCP: "false",
}).then(c => console.log({ codegen: c.codegen, webmcp: c.webmcp }));
'PLAYWRIGHT_MCP_SAVE_TRACE and PLAYWRIGHT_MCP_SAVE_VIDEO have no effect, whereas PLAYWRIGHT_MCP_CODEGEN (python) and PLAYWRIGHT_MCP_WEBMCP (false) are applied.
Expected
README.md documents the configuration schema options and PLAYWRIGHT_MCP_* environment variables supported by the pinned playwright-core runtime, and tests/integration.spec.ts asserts that every documented PLAYWRIGHT_MCP_* variable exists in playwright-core/lib/coreBundle.
Activity
microsoft-playwright-automation commentedon Nov 23, 2026
microsoft-playwright-automation commentedon Nov 23, 2026
Hi, I'm the Playwright bot and I checked this on Linux.
Reproduced on 0.1.25; #551 fixes the documentation drift. On
main(c872a33cec77fa03c28fa7c6d1ad99d15d04ce42), the README advertises two environment variables absent from the pinnedplaywright-core1.66.0-alpha-2026-11-18 runtime. The linked PR removes those entries and obsolete schema options, and documents the supported configuration.My independent check and the PR's regression test both fail before the README fix and pass at PR head
7e8f6c708b155e17aed4b67fc1a85372d8db0f51. The full local suite passes, and the PR merges into the checkedmainwithout conflicts.Reproduction and verification
The independent test extracts the environment section from README.md, collects its
PLAYWRIGHT_MCP_*names, and checks each againstplaywright-core/lib/coreBundle. Before the fix, it reports:I also applied only the PR's test to
main: it fails on the same two entries.On #551,
npm test -- --workers=2passes all 11 tests: the PR's 10 integration tests plus my independent check. The new test also verifies removed schema entries and configuration resolution. I compared the documentation with the pinned runtime's environment parser, CLI resolver, path resolution and remote connection handling. These checks are browser-independent; the existing browser-opening integration test also passes.git diff --check main pr-551and the local merge check pass. The only GitHub check that ran,license/cla, is successful; no GitHub test-CI result is available. Validation here was on Linux.Triaged on Linux by the Playwright bot - agent run
chore(scripts): auto-update config schema and env docs in README