browser_har_export
Export and finalize the HAR file from a browser recording session, closing the session and optionally copying the HAR to a specified output path.
Instructions
Finalize and return the HAR file path for a recording session.
NOTE: This CLOSES the session — Playwright only flushes the HAR buffer when
the browser context closes. The session must have been created with record_har=True.
output_path: copy the finished HAR to this path (e.g. 'results/run1.har').
If omitted, the HAR stays at its auto-generated path under data/har/.
Non-destructive checkpoint pattern (to keep browsing after capturing traffic):
1. browser_storage_state(path='data/checkpoint.json') # save auth/cookies
2. browser_har_export() # closes session, flushes HAR
3. browser_new_session(storage_state='data/checkpoint.json') # resume
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | No | ||
| output_path | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |