Skip to content

fix(chromium): honor Linux config directories for channel connections - #43884

Merged
Pavel Feldman (pavelfeldman) merged 1 commit into
mainfrom
triage/43880/41683457906-1
Nov 3, 2026
Merged

Pavel Feldman (pavelfeldman) merged 1 commit into
mainfrom
triage/43880/41683457906-1

Conversation

@microsoft-playwright-automation

Copy link
Copy Markdown
Contributor

Honor CHROME_CONFIG_HOME, then XDG_CONFIG_HOME, when locating Linux Chrome/Edge profiles for CDP connections, MCP extension access and CLI discovery.

Channel connections also need the WebSocket path on the second line of DevToolsActivePort; using only the port gives a 404 for browsers launched with --remote-debugging-port. Keep /devtools/browser as the fallback for port-only files. Extend the existing CDP connection test to cover both environment variables and their precedence.

Verified with headless and headed Chromium on Linux, the neighboring CDP tests, CLI discovery and attachment checks, and the full build and lint checks.

Fixes #43880

Triaged on Linux by the Playwright bot - agent run

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@pavelfeldman
Pavel Feldman (pavelfeldman) marked this pull request as ready for review November 3, 2026 19:18
return channelToDefaultUserDataDir.has(channel);
}

const linuxConfigHome = process.env.CHROME_CONFIG_HOME || process.env.XDG_CONFIG_HOME || path.join(os.homedir(), '.config');

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Chrome on Linux also honors CHROME_USER_DATA_DIR: when --user-data-dir is absent, chrome_main_delegate.cc takes the entire user data dir from that variable, before the CHROME_CONFIG_HOME / XDG_CONFIG_HOME / ~/.config logic runs (see docs/user_data_dir.md). Chrome Remote Desktop still sets it on hosts that have ~/.config/chrome-remote-desktop/chrome-config/ or chrome-profile/, and the Edge Linux binary reads the same variable. With this PR, such a setup still looks under $config/google-chrome and fails with the same misleading "file not found" error.

Please honor it in both tables, e.g.:

const linuxUserDataDir = (product: string) =>
  process.env.CHROME_USER_DATA_DIR || path.join(linuxConfigHome, product);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both Linux tables now use CHROME_USER_DATA_DIR as the complete profile path, ahead of the config directory variables. I extended CD-001 to verify this precedence and checked CLI discovery for all eight Chrome/Edge channels.

Revised on Linux by the Playwright bot - agent run

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Hi, I'm the Playwright bot. I started to address the review comments on Linux: agent run

return channelToDefaultUserDataDir.has(channel);
}

const linuxConfigHome = process.env.CHROME_CONFIG_HOME || process.env.XDG_CONFIG_HOME || path.join(os.homedir(), '.config');

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Chrome uses CHROME_CONFIG_HOME whenever it is set, even if empty, and falls back to XDG_CONFIG_HOME only when it is unset (chrome/common/chrome_paths_linux.cc, GetDefaultUserDataDirectory). || treats '' as unset, so this differs from Chrome. Use process.env.CHROME_CONFIG_HOME !== undefined ? ... : .... Same in channelSessions.ts.


if (process.platform === 'linux') {
for (const env of [
{ CHROME_CONFIG_HOME: '', XDG_CONFIG_HOME: configHome },

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CHROME_CONFIG_HOME: '' encodes behavior Chrome does not have (see the comment in chromiumChannels.ts). Unset the variable instead.

}, async ({ browserType, createUserDataDir, childProcess }, testInfo) => {
const configHome = await createUserDataDir();
const userDataDir = path.join(configHome, 'google-chrome');
const browserServer = await browserType.launchPersistentContext(userDataDir, {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This removes the only coverage for connectOverCDP to a browser started with launch(). Keep CD-001 as it was and put the channel lookup check in a separate test.

@microsoft-playwright-automation

Copy link
Copy Markdown
Contributor Author

Hi, I'm the Playwright bot and I addressed the review.

Both Linux channel tables now use CHROME_USER_DATA_DIR as the complete profile path before checking the config directory variables. I extended CD-001 to check that precedence and updated the API documentation.

The regression fails before this revision and passes with it, headless and headed. The connection and neighboring suites passed (38 passed, 1 skipped), as did all 13 CLI CDP tests, build, and lint. CLI discovery also found the overridden profile and live endpoint for all eight Chrome/Edge channels.

Only Linux with bundled Chromium was tested; installed Chrome/Edge and Chrome Remote Desktop were not run.

Revised on Linux by the Playwright bot - agent run

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Test results for "MCP"

5194 passed, 616 skipped


Merge workflow run.

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Test results for "tests 1"

2 failed
❌ [default-reuse] › run-tests.spec.ts:1041 › should produce output twice @vscode-extension
❌ [default-trace] › run-tests.spec.ts:1041 › should produce output twice @vscode-extension

1 flaky ⚠️ [installation tests] › playwright-packages-install-behavior.spec.ts:90 › playwright should work with chromium --only-shell `@package-installations-ubuntu-latest`

23577 passed, 704 skipped


Merge workflow run.

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Hi, I'm the Playwright bot and I checked the CI failures against this PR and unrelated runs.

🟢 Both failures are pre-existing CI noise, not caused by this PR

Details

At commit 1312f10, the latest merged report lists two failures of one VS Code extension test. Both have matching failures on unrelated PRs.

Pre-existing flake / infra

run-tests.spec.ts:1041 › should produce output twice (@vscode-extension) fails in [default-reuse] and [default-trace]. The inner test passes, but its output contains an extra GitCommitInfo: timeout of XXms exceeded warning while fetching base commit 3cd8a42. That breaks the exact output comparison.

The unchanged Git metadata plugin emits this warning after a three-second Git timeout. This test only logs text; it does not exercise the browser profile discovery or CDP connection paths changed here.

I refreshed the aggregated CI database with the three-day update. It has no results for these extension projects, so the matching-test evidence comes from the linked job logs, not database statistics. This resolves the uncertainty in the earlier verdict.

The installation test reported as flaky passed on retry after ECONNRESET; it is not an outstanding failure.

Triaged by the Playwright bot - agent run

@pavelfeldman
Pavel Feldman (pavelfeldman) merged commit aa33d27 into main Nov 3, 2026
31 of 32 checks passed
@pavelfeldman
Pavel Feldman (pavelfeldman) deleted the triage/43880/41683457906-1 branch November 3, 2026 21:41
Yury Semikhatsky (yury-s) pushed a commit to microsoft/playwright-mcp that referenced this pull request Nov 9, 2026
## ✨ Highlights

- **🌙 Keep the browser in the background**
([microsoft/playwright#42973](microsoft/playwright#42973))
— connecting through the extension activated the tab and focused the
browser window, taking the screen from the app you were working in. Pass
`--background` alongside `--extension` (config `background: true`, env
`PLAYWRIGHT_MCP_BACKGROUND=1`) to leave the connected tab inactive and
its window unfocused, and to open the client's new tabs in the
background. With `PLAYWRIGHT_MCP_EXTENSION_TOKEN` set, the connect page
opens in the background too (Chrome 158.0.8127.2 or later, with the
browser already running). Requires extension 0.5.0 or later. Chrome
throttles timers and animation frames in background tabs.
([microsoft/playwright#43864](microsoft/playwright#43864))
- **🗂️ Leave tabs out of the Playwright tab group**
([microsoft/playwright#43038](microsoft/playwright#43038))
— the extension always moved the tabs a client controls into its own tab
group. Pass `--no-tab-group` alongside `--extension` (config `tabGroup:
false`, env `PLAYWRIGHT_MCP_NO_TAB_GROUP=1`) to keep the selected tab
and the tabs the client opens in their existing groups, if any.
Connection approval is unchanged, each controlled tab still belongs to
one client, and the extension's status page lists the controlled tabs.
Requires extension 0.5.0 or later.
([microsoft/playwright#43814](microsoft/playwright#43814))
- **👁️ Match only visible elements**
([microsoft/playwright#43855](microsoft/playwright#43855))
— a locator could resolve to a hidden element, or fail because a hidden
duplicate matched as well. Set
`browser.contextOptions.locateOnlyVisible: true` in the config file to
restrict locators to visible elements, both in the `target` of element
tools such as `browser_click` and in `browser_run_code_unsafe`, as if
`.filter({ visible: true })` ended each of them. A locator that ends
with its own visibility filter keeps it. Off by default.
([microsoft/playwright#43903](microsoft/playwright#43903))
- **🏷️ Keep container names in snapshots**
([microsoft/playwright#43809](microsoft/playwright#43809))
— dialogs, landmarks and tables could appear unnamed even when their
heading or caption was visible. `browser_snapshot` now retains
identifying names on containers and table headers when the text
supplying the name also appears among their children.
([microsoft/playwright#43810](microsoft/playwright#43810))
- **🎯 Find custom form controls by label**
([microsoft/playwright#43898](microsoft/playwright#43898))
— native `<label>` associations were ignored for form-associated custom
elements. Element tools now recognize these controls through targets
such as `getByLabel('City')`, and accessible names use the associated
labels too. Both `for` attributes and nested labels are supported.
([microsoft/playwright#43900](microsoft/playwright#43900))

## 🐛 Fixes

- `fix(aria): restore snapshot visibility rules for inert and modal
content` — the filtering announced in v0.0.84 is reverted:
`browser_snapshot` no longer hides content solely because it is inert or
outside a modal dialog. Click, fill and select actions still wait for
explicitly inert targets to become non-inert
([microsoft/playwright#43792](microsoft/playwright#43792)).
([microsoft/playwright#43850](microsoft/playwright#43850),
[microsoft/playwright#43851](microsoft/playwright#43851))
- `fix(mcp): preserve non-JSON evaluation results` — `browser_evaluate`
returns readable representations of values such as BigInt, `NaN`,
`Infinity`, `undefined` and circular objects instead of losing values or
failing JSON serialization. JSON-compatible results keep their existing
format
([#1838](#1838)).
([microsoft/playwright#43973](microsoft/playwright#43973))
- `fix(mcp): resolve config file paths relative to their source` —
profile, executable, storage-state, output and other file paths in a
config resolve against that file's directory, or its target's directory
for a symlink. CLI and environment paths remain relative to the working
directory. Extension connections also honor the merged executable-path
configuration
([#1836](#1836)).
([microsoft/playwright#43970](microsoft/playwright#43970))
- `fix(extension): report lost tab instead of crashing` — tool responses
report when a page closes before its snapshot can be captured. Extension
connections also explain that Chrome may have detached the debugger
because of an unsupported frame, rather than crashing response rendering
([microsoft/playwright#43230](microsoft/playwright#43230)).
([microsoft/playwright#43863](microsoft/playwright#43863))
- `fix(mcp): bound settle waits when page timers cannot run` — tool
calls no longer hang during their settling delay when page timers are
throttled, paused or otherwise unable to run
([microsoft/playwright#43752](microsoft/playwright#43752)).
([microsoft/playwright#43767](microsoft/playwright#43767))
- `fix(mcp): report event listener exceptions as console errors` —
exceptions from page and context listeners installed through
`browser_run_code_unsafe` appear in tool responses and
`browser_console_messages` instead of escaping as unhandled errors
([microsoft/playwright#43770](microsoft/playwright#43770)).
([microsoft/playwright#43686](microsoft/playwright#43686))
- `fix(mcp): validate device names and preserve device descriptors` —
unknown `--device` values produce an explicit error, and per-client
overrides no longer mutate shared device presets
([#1834](#1834)).
([microsoft/playwright#43971](microsoft/playwright#43971))
- `fix(mcp): report one-based console source lines` — source locations
in `browser_console_messages` and console entries in tool responses now
use editor-style line numbers starting at 1
([#1839](#1839)).
([microsoft/playwright#43975](microsoft/playwright#43975))
- `fix(mcp): clarify screenshot actions with vision tools` — the
`browser_take_screenshot` description no longer rules out acting on a
screenshot. `browser_snapshot` stays the default for actions; with
`--caps=vision`, the description points to the coordinate-based mouse
tools for elements that the snapshot does not expose, such as canvas
content
([#1816](#1816)).
([microsoft/playwright#43857](microsoft/playwright#43857))
- `fix(aria): match mixed-case selected options in accessible names` —
snapshots and role locators include the selected option's text when a
custom listbox uses a mixed-case value such as `aria-selected="TRUE"`
([microsoft/playwright#43785](microsoft/playwright#43785)).
([microsoft/playwright#43787](microsoft/playwright#43787))
- `fix(chromium): preserve fonts when connecting with noDefaults` —
extension connections no longer overwrite the existing browser's font
settings, avoiding unexpected changes to page rendering
([microsoft/playwright#43715](microsoft/playwright#43715)).
([microsoft/playwright#43773](microsoft/playwright#43773))
- `fix(chromium): honor Linux config directories for channel
connections` — extension profile lookup respects `CHROME_USER_DATA_DIR`,
`CHROME_CONFIG_HOME` and `XDG_CONFIG_HOME`. Channel-based
`--cdp-endpoint` connections also use the WebSocket path advertised in
`DevToolsActivePort`
([microsoft/playwright#43880](microsoft/playwright#43880)).
([microsoft/playwright#43884](microsoft/playwright#43884))
- `fix(chromium): preserve HTTP navigations across HTTPS upgrade modes`
— in browsers launched by the server, `browser_navigate` keeps HTTP URLs
on HTTP instead of Chrome automatically upgrading them to HTTPS
([microsoft/playwright#43871](microsoft/playwright#43871)).
([microsoft/playwright#43877](microsoft/playwright#43877))
- `fix(chromium): account for tabs and toolbar in the new headless mode`
— with `--headless`, Chrome and Edge now size their window to fit the
viewport below the tab strip and toolbar, so videos from
`browser_start_video` (opt-in via `--caps=devtools`) no longer lose the
bottom of the page.
([microsoft/playwright#43904](microsoft/playwright#43904))
- `fix(screenshot): support full-page SVG documents` —
`browser_take_screenshot` with `fullPage: true` works on standalone SVG
documents instead of waiting for a nonexistent HTML body
([microsoft/playwright#43962](microsoft/playwright#43962)).
([microsoft/playwright#43972](microsoft/playwright#43972))

## 📦 Upgrading

Configs that use `@playwright/mcp@latest` pick this release up on the
next client restart. To pin it:

```bash
npx @playwright/mcp@0.0.85
```

Co-authored-by: microsoft-playwright-automation[bot] <203992400+microsoft-playwright-automation[bot]@users.noreply.github.com>
Yury Semikhatsky (yury-s) pushed a commit to microsoft/playwright-cli that referenced this pull request Nov 10, 2026
## ✨ Highlights

- **🪟 Let agents use your logged-in browser without taking over your
screen**
([microsoft/playwright#42973](microsoft/playwright#42973))
— `PLAYWRIGHT_MCP_BACKGROUND=1 playwright-cli attach --extension=chrome`
keeps controlled tabs and the browser window in the background. You can
also set `"background": true` in your CLI config.
([microsoft/playwright#43864](microsoft/playwright#43864))
- **🎬 Record the whole viewport in headless Chrome and Edge** —
`playwright-cli video-start` no longer loses the bottom of the page to
browser-toolbar sizing in the new headless mode. Trace screenshots
benefit too.
([microsoft/playwright#43904](microsoft/playwright#43904))
- **🧭 Snapshots keep the names agents need**
([microsoft/playwright#43809](microsoft/playwright#43809))
— `playwright-cli snapshot` preserves identifying names on dialogs,
landmarks, tables and column headers, even when their heading or caption
also appears below them.
([microsoft/playwright#43810](microsoft/playwright#43810))
- **👁️ Ignore hidden duplicate elements by default**
([microsoft/playwright#43855](microsoft/playwright#43855))
— set `"browser": { "contextOptions": { "locateOnlyVisible": true } }`
in your CLI config, then run `playwright-cli open
--config=cli.config.json`. Locators resolve only visible matches,
avoiding strict-mode failures from hidden, cached UI. This is opt-in.
([microsoft/playwright#43903](microsoft/playwright#43903))
- **🗂️ Keep your tab strip free of agent-created groups**
([microsoft/playwright#43038](microsoft/playwright#43038))
— set `"tabGroup": false` in your CLI config and use `playwright-cli
attach --extension=chrome --config=cli.config.json`. Extension sessions
can control tabs without creating a Chrome tab group or changing your
existing groups.
([microsoft/playwright#43814](microsoft/playwright#43814))

## 🐛 Fixes

- `fix(cli): use ordinal filenames for repeated downloads` — repeated
downloads of `report.csv` become `report-1.csv`, `report-2.csv`, and so
on instead of silently overwriting earlier files.
([#514](#514),
[microsoft/playwright#44011](microsoft/playwright#44011))
- `fix(cli): restrict profile deletion to the exact session` —
`playwright-cli -s=work delete-data` no longer deletes the persistent
profile of `work-test`.
([#499](#499),
[microsoft/playwright#43928](microsoft/playwright#43928))
- `fix(cli): report command failures in text and JSON modes` — invalid
arguments and startup failures produce a readable error, or an `{
"isError": true, "error": "..." }` object with `--json`, and exit with
code 1 instead of exposing an unhandled rejection.
([#502](#502),
[#522](#522))
- `fix(cli): use CLI command names in error messages` — validation
errors and recovery hints name commands you can actually run, such as
`requests` and `recording-start`, rather than MCP tools, and avoid
doubled `Error:` prefixes.
([#515](#515),
[microsoft/playwright#43932](microsoft/playwright#43932))
- `fix(cli): avoid killing Windows process enumerators` —
`playwright-cli kill-all` correctly reports the daemons it stopped on
Windows instead of saying none were found.
([#525](#525),
[microsoft/playwright#44008](microsoft/playwright#44008))
- `fix(mcp): preserve non-JSON evaluation results` — `playwright-cli
eval '() => 10n'`, circular objects, regular expressions and special
numeric values are represented without turning successful evaluations
into serialization errors or losing their values. JSON-compatible
results retain their existing format.
([microsoft/playwright-mcp#1838](microsoft/playwright-mcp#1838),
[microsoft/playwright#43973](microsoft/playwright#43973))
- `fix(mcp): resolve config file paths relative to their source` —
relative profile, storage-state, executable and output paths now resolve
next to the config file, including `.playwright/cli.config.json` and
`~/.playwright/cli.config.json`, rather than the working directory.
Paths supplied through flags or environment variables remain relative to
the working directory.
([microsoft/playwright-mcp#1836](microsoft/playwright-mcp#1836),
[microsoft/playwright#43970](microsoft/playwright#43970))
- `fix(mcp): validate device names and preserve device descriptors` — an
unknown `--device` reports a clear error instead of silently disabling
emulation; context overrides no longer mutate shared device presets.
([microsoft/playwright-mcp#1834](microsoft/playwright-mcp#1834),
[microsoft/playwright#43971](microsoft/playwright#43971))
- `fix(mcp): bound settle waits when page timers cannot run` — commands
such as `eval` and `click` no longer hang during their post-action wait
on CSP-sandboxed pages or pages with paused clocks.
([microsoft/playwright#43752](microsoft/playwright#43752),
[microsoft/playwright#43767](microsoft/playwright#43767))
- `fix(mcp): report event listener exceptions as console errors` —
exceptions in page or context listeners registered with `run-code`
appear in console output instead of terminating the session.
([microsoft/playwright#43770](microsoft/playwright#43770),
[microsoft/playwright#43686](microsoft/playwright#43686))
- `fix(mcp): report one-based console source lines` — `playwright-cli
console` reports line numbers that match editors and DevTools.
([microsoft/playwright-mcp#1839](microsoft/playwright-mcp#1839),
[microsoft/playwright#43975](microsoft/playwright#43975))
- `fix(extension): report lost tab instead of crashing` — losing the
last controlled tab produces an actionable error instead of an
undefined-property exception, with guidance when another extension's
frame may have caused debugger detachment.
([microsoft/playwright#43230](microsoft/playwright#43230),
[microsoft/playwright#43863](microsoft/playwright#43863))
- `fix(chromium): honor Linux config directories for channel
connections` — browser discovery and attachment respect
`CHROME_CONFIG_HOME` and `XDG_CONFIG_HOME`; CDP connections also use the
WebSocket path recorded by Chrome instead of failing with a 404.
([microsoft/playwright#43880](microsoft/playwright#43880),
[microsoft/playwright#43884](microsoft/playwright#43884))
- `fix(chromium): preserve fonts when connecting with noDefaults` —
attaching to an existing headless browser preserves its font settings
and page layout.
([microsoft/playwright#43715](microsoft/playwright#43715),
[microsoft/playwright#43773](microsoft/playwright#43773))
- `fix(chromium): preserve HTTP navigations across HTTPS upgrade modes`
— explicit HTTP URLs and HTTP route mocks stay on HTTP instead of being
unexpectedly upgraded or failing in Chromium, Chrome and Edge.
([microsoft/playwright#43871](microsoft/playwright#43871),
[microsoft/playwright#43877](microsoft/playwright#43877))
- `fix(screenshot): support full-page SVG documents` — `playwright-cli
screenshot --full-page` captures standalone SVG documents instead of
timing out.
([microsoft/playwright#43962](microsoft/playwright#43962),
[microsoft/playwright#43972](microsoft/playwright#43972))
- `feat(actionability): wait for elements to be non-inert` — clicks,
fills and option selection wait for inert subtrees to become
interactive. Inert elements and content outside modal dialogs remain
available in snapshots and role locators.
([microsoft/playwright#43792](microsoft/playwright#43792),
[microsoft/playwright#43850](microsoft/playwright#43850),
[microsoft/playwright#43851](microsoft/playwright#43851))
- `fix(selectors): support labels for form-associated custom elements` —
label locators and accessible names recognize labels associated with
custom form controls.
([microsoft/playwright#43898](microsoft/playwright#43898),
[microsoft/playwright#43900](microsoft/playwright#43900))
- `fix(aria): match mixed-case selected options in accessible names` —
embedded comboboxes contribute their selected option's name even with
values such as `aria-selected="True"`.
([microsoft/playwright#43785](microsoft/playwright#43785),
[microsoft/playwright#43787](microsoft/playwright#43787))
- `fix(selector generator): do not throw when css fallback path is not
unique` — ambiguous matches in slotted web components report a useful
strict-mode error instead of a `TypeError`.
([microsoft/playwright#43701](microsoft/playwright#43701),
[microsoft/playwright#43705](microsoft/playwright#43705))
- `fix(frames): reject context waits when page closes` — pending
operations on an iframe whose document has not loaded fail when its page
closes instead of waiting indefinitely.
([microsoft/playwright#43647](microsoft/playwright#43647),
[microsoft/playwright#43650](microsoft/playwright#43650))
- `fix(install): report missing dependencies for all browsers` —
`playwright-cli install-browser` reports missing Linux dependencies
across browsers in one pass, including package names for Vulkan and
Graphene.
([microsoft/playwright#43747](microsoft/playwright#43747),
[microsoft/playwright#43750](microsoft/playwright#43750))

## 📦 Upgrading

```bash
npm install -g @playwright/cli@0.1.24
```

Co-authored-by: microsoft-playwright-automation[bot] <203992400+microsoft-playwright-automation[bot]@users.noreply.github.com>
renovate Bot added a commit to izumin5210/dotfiles that referenced this pull request Nov 14, 2026
This PR contains the following updates:

| Package | Change |
[Age](https://docs.renovatebot.com/merge-confidence/) |
[Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|
| [@playwright/mcp](https://playwright.dev)
([source](https://redirect.github.com/microsoft/playwright-mcp)) |
[`0.0.83` →
`0.0.85`](https://renovatebot.com/diffs/npm/@playwright%2fmcp/0.0.83/0.0.85)
|
![age](https://developer.mend.io/api/mc/badges/age/npm/@playwright%2fmcp/0.0.85?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@playwright%2fmcp/0.0.83/0.0.85?slim=true)
|

---

### Release Notes

<details>
<summary>microsoft/playwright-mcp (@&#8203;playwright/mcp)</summary>

###
[`v0.0.85`](https://redirect.github.com/microsoft/playwright-mcp/releases/tag/v0.0.85)

[Compare
Source](https://redirect.github.com/microsoft/playwright-mcp/compare/v0.0.84...v0.0.85)

#### ✨ Highlights

- **🌙 Keep the browser in the background**
([microsoft/playwright#42973](https://redirect.github.com/microsoft/playwright/issues/42973))
— connecting through the extension activated the tab and focused the
browser window, taking the screen from the app you were working in. Pass
`--background` alongside `--extension` (config `background: true`, env
`PLAYWRIGHT_MCP_BACKGROUND=1`) to leave the connected tab inactive and
its window unfocused, and to open the client's new tabs in the
background. With `PLAYWRIGHT_MCP_EXTENSION_TOKEN` set, the connect page
opens in the background too (Chrome 158.0.8127.2 or later, with the
browser already running). Requires extension 0.5.0 or later. Chrome
throttles timers and animation frames in background tabs.
([microsoft/playwright#43864](https://redirect.github.com/microsoft/playwright/pull/43864))
- **🗂️ Leave tabs out of the Playwright tab group**
([microsoft/playwright#43038](https://redirect.github.com/microsoft/playwright/issues/43038))
— the extension always moved the tabs a client controls into its own tab
group. Pass `--no-tab-group` alongside `--extension` (config `tabGroup:
false`, env `PLAYWRIGHT_MCP_NO_TAB_GROUP=1`) to keep the selected tab
and the tabs the client opens in their existing groups, if any.
Connection approval is unchanged, each controlled tab still belongs to
one client, and the extension's status page lists the controlled tabs.
Requires extension 0.5.0 or later.
([microsoft/playwright#43814](https://redirect.github.com/microsoft/playwright/pull/43814))
- **👁️ Match only visible elements**
([microsoft/playwright#43855](https://redirect.github.com/microsoft/playwright/issues/43855))
— a locator could resolve to a hidden element, or fail because a hidden
duplicate matched as well. Set
`browser.contextOptions.locateOnlyVisible: true` in the config file to
restrict locators to visible elements, both in the `target` of element
tools such as `browser_click` and in `browser_run_code_unsafe`, as if
`.filter({ visible: true })` ended each of them. A locator that ends
with its own visibility filter keeps it. Off by default.
([microsoft/playwright#43903](https://redirect.github.com/microsoft/playwright/pull/43903))
- **🏷️ Keep container names in snapshots**
([microsoft/playwright#43809](https://redirect.github.com/microsoft/playwright/issues/43809))
— dialogs, landmarks and tables could appear unnamed even when their
heading or caption was visible. `browser_snapshot` now retains
identifying names on containers and table headers when the text
supplying the name also appears among their children.
([microsoft/playwright#43810](https://redirect.github.com/microsoft/playwright/pull/43810))
- **🎯 Find custom form controls by label**
([microsoft/playwright#43898](https://redirect.github.com/microsoft/playwright/issues/43898))
— native `<label>` associations were ignored for form-associated custom
elements. Element tools now recognize these controls through targets
such as `getByLabel('City')`, and accessible names use the associated
labels too. Both `for` attributes and nested labels are supported.
([microsoft/playwright#43900](https://redirect.github.com/microsoft/playwright/pull/43900))

#### 🐛 Fixes

- `fix(aria): restore snapshot visibility rules for inert and modal
content` — the filtering announced in v0.0.84 is reverted:
`browser_snapshot` no longer hides content solely because it is inert or
outside a modal dialog. Click, fill and select actions still wait for
explicitly inert targets to become non-inert
([microsoft/playwright#43792](https://redirect.github.com/microsoft/playwright/issues/43792)).
([microsoft/playwright#43850](https://redirect.github.com/microsoft/playwright/pull/43850),
[microsoft/playwright#43851](https://redirect.github.com/microsoft/playwright/pull/43851))
- `fix(mcp): preserve non-JSON evaluation results` — `browser_evaluate`
returns readable representations of values such as BigInt, `NaN`,
`Infinity`, `undefined` and circular objects instead of losing values or
failing JSON serialization. JSON-compatible results keep their existing
format
([#&#8203;1838](https://redirect.github.com/microsoft/playwright-mcp/issues/1838)).
([microsoft/playwright#43973](https://redirect.github.com/microsoft/playwright/pull/43973))
- `fix(mcp): resolve config file paths relative to their source` —
profile, executable, storage-state, output and other file paths in a
config resolve against that file's directory, or its target's directory
for a symlink. CLI and environment paths remain relative to the working
directory. Extension connections also honor the merged executable-path
configuration
([#&#8203;1836](https://redirect.github.com/microsoft/playwright-mcp/issues/1836)).
([microsoft/playwright#43970](https://redirect.github.com/microsoft/playwright/pull/43970))
- `fix(extension): report lost tab instead of crashing` — tool responses
report when a page closes before its snapshot can be captured. Extension
connections also explain that Chrome may have detached the debugger
because of an unsupported frame, rather than crashing response rendering
([microsoft/playwright#43230](https://redirect.github.com/microsoft/playwright/issues/43230)).
([microsoft/playwright#43863](https://redirect.github.com/microsoft/playwright/pull/43863))
- `fix(mcp): bound settle waits when page timers cannot run` — tool
calls no longer hang during their settling delay when page timers are
throttled, paused or otherwise unable to run
([microsoft/playwright#43752](https://redirect.github.com/microsoft/playwright/issues/43752)).
([microsoft/playwright#43767](https://redirect.github.com/microsoft/playwright/pull/43767))
- `fix(mcp): report event listener exceptions as console errors` —
exceptions from page and context listeners installed through
`browser_run_code_unsafe` appear in tool responses and
`browser_console_messages` instead of escaping as unhandled errors
([microsoft/playwright#43770](https://redirect.github.com/microsoft/playwright/issues/43770)).
([microsoft/playwright#43686](https://redirect.github.com/microsoft/playwright/pull/43686))
- `fix(mcp): validate device names and preserve device descriptors` —
unknown `--device` values produce an explicit error, and per-client
overrides no longer mutate shared device presets
([#&#8203;1834](https://redirect.github.com/microsoft/playwright-mcp/issues/1834)).
([microsoft/playwright#43971](https://redirect.github.com/microsoft/playwright/pull/43971))
- `fix(mcp): report one-based console source lines` — source locations
in `browser_console_messages` and console entries in tool responses now
use editor-style line numbers starting at 1
([#&#8203;1839](https://redirect.github.com/microsoft/playwright-mcp/issues/1839)).
([microsoft/playwright#43975](https://redirect.github.com/microsoft/playwright/pull/43975))
- `fix(mcp): clarify screenshot actions with vision tools` — the
`browser_take_screenshot` description no longer rules out acting on a
screenshot. `browser_snapshot` stays the default for actions; with
`--caps=vision`, the description points to the coordinate-based mouse
tools for elements that the snapshot does not expose, such as canvas
content
([#&#8203;1816](https://redirect.github.com/microsoft/playwright-mcp/issues/1816)).
([microsoft/playwright#43857](https://redirect.github.com/microsoft/playwright/pull/43857))
- `fix(aria): match mixed-case selected options in accessible names` —
snapshots and role locators include the selected option's text when a
custom listbox uses a mixed-case value such as `aria-selected="TRUE"`
([microsoft/playwright#43785](https://redirect.github.com/microsoft/playwright/issues/43785)).
([microsoft/playwright#43787](https://redirect.github.com/microsoft/playwright/pull/43787))
- `fix(chromium): preserve fonts when connecting with noDefaults` —
extension connections no longer overwrite the existing browser's font
settings, avoiding unexpected changes to page rendering
([microsoft/playwright#43715](https://redirect.github.com/microsoft/playwright/issues/43715)).
([microsoft/playwright#43773](https://redirect.github.com/microsoft/playwright/pull/43773))
- `fix(chromium): honor Linux config directories for channel
connections` — extension profile lookup respects `CHROME_USER_DATA_DIR`,
`CHROME_CONFIG_HOME` and `XDG_CONFIG_HOME`. Channel-based
`--cdp-endpoint` connections also use the WebSocket path advertised in
`DevToolsActivePort`
([microsoft/playwright#43880](https://redirect.github.com/microsoft/playwright/issues/43880)).
([microsoft/playwright#43884](https://redirect.github.com/microsoft/playwright/pull/43884))
- `fix(chromium): preserve HTTP navigations across HTTPS upgrade modes`
— in browsers launched by the server, `browser_navigate` keeps HTTP URLs
on HTTP instead of Chrome automatically upgrading them to HTTPS
([microsoft/playwright#43871](https://redirect.github.com/microsoft/playwright/issues/43871)).
([microsoft/playwright#43877](https://redirect.github.com/microsoft/playwright/pull/43877))
- `fix(chromium): account for tabs and toolbar in the new headless mode`
— with `--headless`, Chrome and Edge now size their window to fit the
viewport below the tab strip and toolbar, so videos from
`browser_start_video` (opt-in via `--caps=devtools`) no longer lose the
bottom of the page.
([microsoft/playwright#43904](https://redirect.github.com/microsoft/playwright/pull/43904))
- `fix(screenshot): support full-page SVG documents` —
`browser_take_screenshot` with `fullPage: true` works on standalone SVG
documents instead of waiting for a nonexistent HTML body
([microsoft/playwright#43962](https://redirect.github.com/microsoft/playwright/issues/43962)).
([microsoft/playwright#43972](https://redirect.github.com/microsoft/playwright/pull/43972))

###
[`v0.0.84`](https://redirect.github.com/microsoft/playwright-mcp/releases/tag/v0.0.84)

[Compare
Source](https://redirect.github.com/microsoft/playwright-mcp/compare/v0.0.83...v0.0.84)

#### ✨ Highlights

- **👥 Separate sessions in one browser** — work with multiple accounts
without sharing their cookies or storage. `browser_tabs` with `action:
"new"` now accepts `isolatedContext: "<name>"`: tabs with the same name
share a context, while different names stay isolated. Omit it or use
`"default"` for the default context. Cookie and storage tools operate on
the current tab's context.
([microsoft/playwright#43087](https://redirect.github.com/microsoft/playwright/pull/43087))
- **🙈 Redact runtime values in URLs**
([#&#8203;1791](https://redirect.github.com/microsoft/playwright-mcp/issues/1791))
— session and grant values minted at runtime cannot be listed in a
secrets file ahead of time. `--redact-url-params=access_token,code`
(config `redactUrlParams`, env `PLAYWRIGHT_MCP_REDACT_URL_PARAMS`)
replaces the named query and fragment parameter values with `<redacted>`
in tool responses. Like `secrets`, this is a convenience, not a security
feature. The extension also removes its connection token from the
connect page URL after reading it.
([microsoft/playwright#43258](https://redirect.github.com/microsoft/playwright/pull/43258))
- **🔎 Bound find results**
([microsoft/playwright#42077](https://redirect.github.com/microsoft/playwright/issues/42077))
— common search terms no longer have to fill the response with every
match. `browser_find` accepts a positive integer `maxResults`, returns
the first matching items with their context, and reports the total match
count. Omit it to keep returning all matches; ancestor paths are
unchanged.
([microsoft/playwright#42947](https://redirect.github.com/microsoft/playwright/pull/42947))
- **🌐 Inspect requests across navigations**
([microsoft/playwright-cli#479](https://redirect.github.com/microsoft/playwright-cli/issues/479))
— requests from the previous page are no longer lost as soon as a flow
navigates. `browser_network_requests` accepts `all: true` to include
retained history, keeping up to 200 requests from earlier navigations.
Request indexes stay stable across navigations for
`browser_network_request`. `browser_console_messages` also reports
counts consistent with its existing `all` option.
([microsoft/playwright#43526](https://redirect.github.com/microsoft/playwright/pull/43526))
- **🎯 Use locators in your language**
([#&#8203;1797](https://redirect.github.com/microsoft/playwright-mcp/issues/1797))
— element tools such as `browser_click` now accept JavaScript, Python,
Java and C# locators in `target`, alongside snapshot refs and CSS
selectors. Invalid targets get an actionable error, including a reminder
to pass the bare ref rather than `button [ref=e5]`.
([microsoft/playwright#43539](https://redirect.github.com/microsoft/playwright/pull/43539))
- **📂 Skip unsupported workspace-root requests**
([#&#8203;1798](https://redirect.github.com/microsoft/playwright-mcp/issues/1798))
— clients that advertise roots but cannot answer `roots/list` can stall
the first tool call. Pass `--ignore-roots` (config `ignoreRoots: true`,
env `PLAYWRIGHT_MCP_IGNORE_ROOTS=true`) to skip that request and use the
server's current working directory as the workspace root.
([microsoft/playwright#43532](https://redirect.github.com/microsoft/playwright/pull/43532))
- **🍪 Delete cookies by domain and path** — deleting a cookie by name no
longer has to remove every cookie with that name.
`browser_cookie_delete` (opt-in via `--caps=storage`) accepts optional
`domain` and `path` filters to leave other domains and paths untouched.
([microsoft/playwright#43319](https://redirect.github.com/microsoft/playwright/pull/43319))

#### 🐛 Fixes

- `fix(mcp): allow combining time, text and textGone in
browser_wait_for` — when combined with a text condition, `time` is its
timeout (capped at 30 seconds), not a delay before checking it.
Supplying both `text` and `textGone` now waits for the first condition
to happen, rather than both in sequence.
([microsoft/playwright#43011](https://redirect.github.com/microsoft/playwright/pull/43011))
- `fix(mcp): allow loopback hosts by default for all bind addresses` —
HTTP clients can connect through `localhost`, `127.0.0.1` or `[::1]`
regardless of the bind address. Other hosts still require
`--allowed-hosts`; binding to `0.0.0.0` prints a usable localhost URL.
([microsoft/playwright#42993](https://redirect.github.com/microsoft/playwright/pull/42993))
- `fix(mcp): pass credentials from --proxy-server as proxy
username/password` — credentials embedded in the proxy URL are now
passed to the browser as proxy authentication settings.
([microsoft/playwright#43071](https://redirect.github.com/microsoft/playwright/pull/43071))
- `fix(mcp): race browser_navigate_back against modal states` —
`browser_navigate_back` reports a dialog opened during history
navigation instead of timing out.
([microsoft/playwright#43252](https://redirect.github.com/microsoft/playwright/pull/43252))
- `fix(mcp): normalize bare host URLs and loopback IP addresses` —
`browser_navigate` handles scheme-less hosts with ports and uses HTTP
for loopback addresses such as `127.0.0.1:3000` and `[::1]:3000`.
([microsoft/playwright#43264](https://redirect.github.com/microsoft/playwright/pull/43264))
- `fix(mcp): do not close the browser twice when the client disconnects`
— stdio disconnects let the browser close gracefully instead of
force-killing it through a second close request. Dashboard annotation
processes also exit when their parent goes away.
([microsoft/playwright#43174](https://redirect.github.com/microsoft/playwright/pull/43174))
- `fix(mcp): give each isolated client its own idle timer` — with HTTP
transport and `--isolated`, an idle client's context now expires even
while another client keeps the shared browser busy.
([microsoft/playwright#43527](https://redirect.github.com/microsoft/playwright/pull/43527))
- `fix(mcp): apply route headers without bypassing origin filters` —
`browser_route` (opt-in via `--caps=network`) matches added request
header names case-insensitively, includes custom headers in mocked
responses, and preserves origin filters and other routes when modifying
request headers.
([microsoft/playwright#43227](https://redirect.github.com/microsoft/playwright/pull/43227),
[microsoft/playwright#43244](https://redirect.github.com/microsoft/playwright/pull/43244),
[microsoft/playwright#43637](https://redirect.github.com/microsoft/playwright/pull/43637))
- `fix(mcp): correct cookie filtering and missing-domain errors` —
`browser_cookie_list` (opt-in via `--caps=storage`) matches domain and
path boundaries instead of unrelated names such as `notexample.com` or
`/apiary`. `browser_cookie_set` asks for an explicit `domain` when the
current page has no hostname, such as `about:blank`.
([microsoft/playwright#43316](https://redirect.github.com/microsoft/playwright/pull/43316),
[microsoft/playwright#43368](https://redirect.github.com/microsoft/playwright/pull/43368),
[microsoft/playwright#43318](https://redirect.github.com/microsoft/playwright/pull/43318))
- `fix(mcp): accept Windows paths in browser_resume location` —
`browser_resume` (opt-in via `--caps=devtools`) no longer mistakes a
Windows drive-letter colon for the line-number separator.
([microsoft/playwright#43349](https://redirect.github.com/microsoft/playwright/pull/43349))
- `fix(mcp): report run-code route handler exceptions once and verbatim`
— `browser_run_code_unsafe` reports a route handler's thrown value
without duplicating it or wrapping non-Error values in another error.
([microsoft/playwright#43203](https://redirect.github.com/microsoft/playwright/pull/43203))
- `fix(extension): release debugger when attach completes after
connection close` — disconnecting while `browser_tabs` attaches to a new
tab no longer leaves that tab attached to the extension's debugger.
([microsoft/playwright#43025](https://redirect.github.com/microsoft/playwright/pull/43025))
- `fix(chromium): close pages that crashed before connecting over CDP` —
connecting through `--cdp-endpoint` no longer stalls on an already
crashed or discarded page; those pages are omitted from the tab list.
([microsoft/playwright#43075](https://redirect.github.com/microsoft/playwright/pull/43075))
- `fix(aria): skip text nodes that are not rendered` —
`browser_snapshot` and accessible names omit unrendered text, including
unslotted shadow-host text and text directly inside closed `<details>`.
([microsoft/playwright#43150](https://redirect.github.com/microsoft/playwright/pull/43150))
- `fix(a11y): treat inert elements and content outside of modal dialogs
as hidden` — snapshots exclude inert content and content outside the
topmost modal `<dialog>`. Click and fill actions wait for targets to
stop being inert instead of silently misfiring.
([microsoft/playwright#43211](https://redirect.github.com/microsoft/playwright/pull/43211))
- `fix(aria): do not count whitespace-only contributors as name sources`
— snapshots retain button names when whitespace around a hidden icon
previously caused the name to disappear.
([microsoft/playwright#43317](https://redirect.github.com/microsoft/playwright/pull/43317))
- `fix(aria): resolve label references consistently` — snapshots and
role locators recognize tab- or newline-separated label IDs and labels
assigned through `ariaLabelledByElements`, while retaining
attribute-based labels in older browsers.
([microsoft/playwright#43361](https://redirect.github.com/microsoft/playwright/pull/43361),
[microsoft/playwright#43577](https://redirect.github.com/microsoft/playwright/pull/43577),
[microsoft/playwright#43722](https://redirect.github.com/microsoft/playwright/pull/43722))
- `fix(aria): quote ~, .inf and .nan in aria snapshots` — YAML-like
names remain strings rather than being parsed as null or special
floating-point values.
([microsoft/playwright#43469](https://redirect.github.com/microsoft/playwright/pull/43469))
- `fix(aria): preserve iframe snapshots with fallback text` — snapshots
retain an iframe's contents when the iframe element also contains
fallback text.
([microsoft/playwright#43635](https://redirect.github.com/microsoft/playwright/pull/43635))
- `fix(aria): match mixed-case roles and states` — snapshots and role
locators recognize mixed-case `role` and ARIA state values, including
checked, pressed and expanded states.
([microsoft/playwright#43727](https://redirect.github.com/microsoft/playwright/pull/43727))

#### 📦 Upgrading

Configs that use `@playwright/mcp@latest` pick this release up on the
next client restart. To pin it:

```bash
npx @playwright/mcp@0.0.84
```

</details>

---

### Configuration

📅 **Schedule**: (in timezone Asia/Tokyo)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/izumin5210/dotfiles).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4yMjguMCIsInVwZGF0ZWRJblZlciI6IjQ0LjIyOC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiXX0=-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: connectOverCDP('chrome') ignores XDG_CONFIG_HOME / CHROME_CONFIG_HOME when locating DevToolsActivePort on Linux

2 participants