screencast
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.
When captions is enabled, action annotations are burned into the video — Playwright only,
via page.screencast.showActions()/showChapter(); silently absent on the CDP path, since CDP
screencast frames are raw, uncomposited page captures with no overlay mechanism. subtitles
(a standalone .srt) works identically on both paths, since it’s driven by step events, not by
the video API. Default on=fail keeps videos for failed tests only; on=test keeps every
test’s video.
Note: enabling Playwright’s helper-level video: true together with this plugin produces two
independent recordings (output/videos/*.webm from the helper, output/screencast/*.webm from
this plugin).
Configuration
Section titled “Configuration”plugins: { screencast: { enabled: true, on: 'fail', }}on= modes
Section titled “on= modes”- fail — record while running; delete on pass, keep on fail (default)
- test — record and keep every test’s video
Other config options:
captions: burn-in action overlays viapage.screencast.showActions(). Playwright only. Default: true.subtitles: also write a standalone.srtfile alongside the video. Default: false.video: record a video. Withvideo=false, subtitles=true, only the.srtis produced. Default: true.size: pass-through{ width, height }—screencast.start’ssizeon Playwright,maxWidth/maxHeighton the CDP path.quality: pass-through 0–100 forscreencast.start(Playwright) or CDPPage.startScreencast(CDPBrowser family).
CLI examples:
npx codeceptjs run -p screencastnpx codeceptjs run -p screencast:on=testnpx codeceptjs run -p screencast:on=test;captions=false;subtitles=trueParameters
Section titled “Parameters”config