Skip to content

feat(tracing): add tracing.startHar / tracing.stopHar#40159

Open
dgozman wants to merge 1 commit intomicrosoft:mainfrom
dgozman:tracing-har
Open

feat(tracing): add tracing.startHar / tracing.stopHar#40159
dgozman wants to merge 1 commit intomicrosoft:mainfrom
dgozman:tracing-har

Conversation

@dgozman
Copy link
Copy Markdown
Collaborator

@dgozman dgozman commented Apr 10, 2026

Summary

  • Adds tracing.startHar(path, options?) / tracing.stopHar() to scope HAR recording to an individual flow, instead of committing at context creation time via recordHar.
  • Available on both BrowserContext.tracing and the newly exposed APIRequestContext.tracing.
  • Reuses the existing HarRecorder; moves HAR recording state off BrowserContext and onto Tracing.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

Adds on-demand HAR recording to `Tracing`, available on both
`BrowserContext.tracing` and `APIRequestContext.tracing`. Unlike
`recordHar`, this can be scoped to an individual flow via explicit
start/stop calls.
@github-actions
Copy link
Copy Markdown
Contributor

Test results for "tests 1"

8 flaky ⚠️ [chromium-library] › library/inspector/cli-codegen-csharp.spec.ts:202 › should not print context options method override in mstest if no options were passed `@chromium-ubuntu-22.04-arm-node20`
⚠️ [chromium-library] › library/video.spec.ts:652 › screencast › should capture full viewport `@chromium-ubuntu-22.04-arm-node20`
⚠️ [chromium-library] › library/inspector/recorder-api.spec.ts:120 › should type `@chromium-ubuntu-22.04-node24`
⚠️ [chromium-library] › library/video.spec.ts:687 › screencast › should capture full viewport on hidpi `@chromium-ubuntu-22.04-node20`
⚠️ [chromium-library] › library/popup.spec.ts:261 › should not throw when click closes popup `@chromium-ubuntu-22.04-node22`
⚠️ [chromium-page] › page/page-request-continue.spec.ts:754 › propagate headers cross origin redirect after interception `@chromium-ubuntu-22.04-node22`
⚠️ [firefox-page] › page/page-emulate-media.spec.ts:144 › should keep reduced motion and color emulation after reload `@firefox-ubuntu-22.04-node20`
⚠️ [firefox-page] › page/page-wait-for-function.spec.ts:104 › should work with strict CSP policy `@firefox-ubuntu-22.04-node20`

39166 passed, 846 skipped


Merge workflow run.

@github-actions
Copy link
Copy Markdown
Contributor

Test results for "MCP"

2 failed
❌ [firefox] › mcp/cli-test.spec.ts:23 › debug test and snapshot @mcp-windows-latest
❌ [chromium] › mcp/cli-core.spec.ts:162 › dialog-dismiss @mcp-macos-latest

6479 passed, 383 skipped


Merge workflow run.

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.

2 participants