feat(cli): channel-named attach sessions and detach command - #40408
Conversation
When `playwright-cli attach --cdp=<channel>` (or `--extension=<channel>`) uses a value from the known browser include list, default the session name to that channel instead of `default`, so parallel attaches to Chrome and Edge don't collide. Explicit `--session` still wins. Also add a `detach` command symmetric to `attach` that tears down an attached session's daemon (leaving the external browser running) and refuses to act on sessions created via `open`.
|
|
||
| Supported channels: `chrome`, `chrome-beta`, `chrome-dev`, `chrome-canary`, `msedge`, `msedge-beta`, `msedge-dev`, `msedge-canary`. | ||
|
|
||
| When `--session` is not provided, the session is named after the channel (e.g. `--cdp=msedge` creates a session called `msedge`), so parallel attaches to Chrome and Edge don't collide on `default`. Pass `--session=<name>` to override. |
There was a problem hiding this comment.
Reading this I'd expect it to use default session name if no channel is explicitly provided, let's clarify that.
bc82f03
into
microsoft:main
Test results for "MCP"7 failed 6670 passed, 928 skipped Merge workflow run. |
Summary
playwright-cli attach --cdp=<channel>/--extension=<channel>now defaults the session name to the channel (e.g.chrome,msedge) when--sessionisn't passed, so parallel attaches no longer collide ondefault. URL-form--cdp=http://...still usesdefault.detachcommand, symmetric toattach: tears down an attached session's daemon without touching the external browser. Errors on sessions created viaopen(points the user toclose).