Skip to content

feat(mcp): add start/stop recording commands - #42359

Merged
Yury Semikhatsky (yury-s) merged 3 commits into
microsoft:mainfrom
yury-s:fix-42338
Aug 24, 2026
Merged

feat(mcp): add start/stop recording commands#42359
Yury Semikhatsky (yury-s) merged 3 commits into
microsoft:mainfrom
yury-s:fix-42338

Conversation

@yury-s

Copy link
Copy Markdown
Member

Summary

  • New browser_start_recording / browser_stop_recording MCP tools and recording-start / recording-stop CLI commands that record user actions in the browser and return them as Playwright code.
  • Works with launched browsers in headed mode, not only ones attached via the extension.

Fixes#42338

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

Comment threadpackages/playwright-core/src/server/recorder/recorderApp.ts
Comment threadpackages/playwright-core/src/server/recorder/recorderApp.ts
Comment threadpackages/playwright-core/src/server/recorder/recorderApp.ts Outdated
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

Comment threadpackages/playwright-core/src/tools/backend/context.ts Outdated
Comment threadpackages/playwright-core/src/tools/backend/context.ts Outdated
Comment threadpackages/playwright-core/src/tools/backend/recorder.ts Outdated
Comment threadpackages/playwright-core/src/tools/cli-daemon/commands.ts Outdated
Comment threadpackages/playwright-core/src/tools/cli-daemon/commands.ts Outdated
- move recording tool and cli commands to the devtools capability
- declare the internal BrowserContext api in tools instead of casting to any
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

Copy link
Copy Markdown
Contributor

Test results for "tests 1"

6 flaky⚠️ [chromium-library] › library/popup.spec.ts:260 › should not throw when click closes popup `@chromium-ubuntu-22.04-arm-node20`
⚠️ [chromium-library] › library/browsercontext-reuse.spec.ts:361 › reuse launch › should work with routeWebSocket `@realtime-time-library-chromium-linux`
⚠️ [chromium-library] › library/video.spec.ts:664 › screencast › should capture full viewport `@realtime-time-library-chromium-linux`
⚠️ [chromium-library] › library/video.spec.ts:699 › screencast › should capture full viewport on hidpi `@chromium-ubuntu-22.04-node24`
⚠️ [firefox-library] › library/trace-viewer.spec.ts:1782 › should open snapshot in new browser context `@firefox-ubuntu-22.04-node20`
⚠️ [firefox-page] › page/page-event-request.spec.ts:181 › should return response body when Cross-Origin-Opener-Policy is set `@firefox-ubuntu-22.04-node20`

51400 passed, 1238 skipped


Merge workflow run.

@yury-s
Yury Semikhatsky (yury-s) merged commit f46278a into microsoft:mainAug 24, 2026
45 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

Test results for "MCP"

8259 passed, 1361 skipped


Merge workflow run.

Sign up for freeto 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.

[REQUEST] codegen for MCP?

2 participants

@yury-s@pavelfeldman