You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(CDPBrowser): CDP screencast recording with APNG assembly
Adds startScreencast/stopScreencast to CDPBrowser via raw CDP
Page.startScreencast, buffering acknowledged Page.screencastFrame events
and muxing them into an APNG on stop. Verified format:'png' is honored by
both Chrome and Obscura v0.2.0 (magic bytes checked directly, not assumed)
before building the assembler; frames with a differing size than the first
are dropped with a debug note rather than guessed at, and a non-PNG frame
aborts assembly with a debug note instead of producing a broken file.
New lib/helper/extras/apngAssembler.js does pure container-level PNG chunk
muxing (IHDR/acTL/fcTL/IDAT/fdAT/IEND, CRC-32) with no new dependencies and
no pixel encoding.
The screencast plugin now supports this as a second path alongside its
existing Playwright page.screencast (webm) flow, chosen automatically per
active helper; captions/showActions stay Playwright-only, .srt subtitles
are unchanged since they're driven by step events either way. Also fixes
the plugin being unreachable for CDP-family helpers at all: getBrowserHelper
only recognizes the 4 standard acting helpers, so a local duck-typed
fallback (any helper exposing startScreencast) is used instead of widening
that shared list for every plugin that consumes it.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
| Screenshots | yes | yes (v0.2.0+ default builds); no on `-no-render`/v0.1.x | yes |
145
145
| Visibility assertions | yes | yes (v0.2.0+ default builds); no, DOM-presence only, on `-no-render`/v0.1.x | yes |
146
+
| Screencast / video (`screencast` plugin) | yes — WebM via `page.screencast`, with caption burn-in | yes — APNG via CDP `Page.startScreencast`, assembled in-process (v0.2.0+ default builds; verified PNG frames on the live server); no caption burn-in | untested |
146
147
| Startup cost | seconds + ~300 MB install | instant, 70 MB binary |~1 s, zero local |
Copy file name to clipboardExpand all lines: docs/plugins.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -71,7 +71,7 @@ Retries each failed step in a test.
71
71
72
72
## [screencast](/plugins/screencast)
73
73
74
-
Records WebM video of tests using Playwright's screencast API.
74
+
Records a video of tests. Uses Playwright's `page.screencast` API (WebM) when the active helper is Playwright, or raw CDP `Page.startScreencast` (APNG, assembled in-process) when the active helper is `CDPBrowser` or a subclass (`Obscura`, `Kitesurf`, ...). Which path is used is detected automatically per test run; nothing in the config changes between them.
this.debugSection('Screencast',`frame ${nonPngIndex} is not a PNG (first bytes: ${buffers[nonPngIndex].subarray(0,8).toString('hex')}) — this engine isn't honoring format: 'png'; skipping APNG assembly`)
onDropFrame: info=>this.debugSection('Screencast',`dropped a frame with size ${info.width}x${info.height}, expected ${info.expectedWidth}x${info.expectedHeight}`),
0 commit comments