arrow-left Back to topicQuizVideosCheck yourself1.You want videos to be recorded but not waste disk space on passing tests. Which mode should you use?video: 'on' — record everythingvideo: 'retain-on-failure' — record everything but delete passing test videosvideo: 'on-first-retry' — only record when a test is retriedvideo: 'off-on-pass' — a mode that skips recording if the test passes2.You create a browser context manually with browser.newContext() and configure video: 'on'. After running the test, the video file doesn't appear. What's missing?You need to call page.video().save() to flush the video fileYou must await context.close() — video is saved to disk only when the browser context closesManual contexts don't support video recording — use the fixture-based { context } insteadCall page.video().start() explicitly before the test begins3.Where can you find and play back test videos after a run?In the playwright/ directory at the project rootIn test-results/ — each test gets its own subfolder with the video alongside traces and screenshots; also accessible in the HTML reportIn playwright-report/videos/ — video files are bundled with the reportIn a temporary OS directory that's cleared after each run4.You configure video: 'on-first-retry' but your suite runs with retries: 0. A test fails. Is there a video?Yes — 'on-first-retry' means record when a test fails for the first timeNo — 'on-first-retry' records only when a test is retried; with retries: 0, no retry ever happens, so no video is recordedIt depends — Playwright records the video speculatively but deletes it if there's no retryYes — Playwright treats a first-and-only failure as an implicit first retry5.After your test finishes but while the context is still open, you call page.video().path(). What does it return?The final path where the video will be savednull — path() resolves only after the page or context closes, since the video file isn't finalized yetA temporary path to the in-progress video bufferAn error — calling path() before close() throws an exception6.What is the default video resolution when no size is specified in the video config?1280×720 — standard HDThe viewport size scaled to fit 800×800 — Playwright scales the viewport to fit within 800×800 pixelsThe exact viewport size — 1280×720 if using the default Playwright viewport480×360 — optimized for small file sizes7.You want to share a recorded test failure with a non-technical stakeholder who doesn't use Playwright. What's the easiest way to show them what went wrong?Share the trace.zip file — it contains a visual trace they can exploreShare the video file (video.webm or MP4) — it plays in any browser or media player and shows exactly what the browser did during the testExport screenshots from the HTML report as a slideshowGive them access to the HTML report — it's self-contained and easy to navigate8.Can video annotations (highlighting actions with outlines and test step names in the video) help with non-technical stakeholder reviews?No — annotations are only for developer debuggingYes — annotations add visual callouts for each action and can display test step names, making it clear what the test was doing at each point in the videoOnly if you use test.step() — without steps, annotations don't add contextAnnotations are not a Playwright feature — you'd need a separate video editing toolSubmit answersarrow-left PreviousTouch events (legacy)Best PracticesNext arrow-right