Loading skill
Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Records headless Playwright browser test sessions as .webm videos for PR review and bug fix verification.
83% 96%+13 ptsof test cases passed
Passed 22 of 23 test cases with the skill, and 19 of 23 without it.
3 of 3 safety checks passed
Not used yet
Use Playwright's video recording to capture headless browser operations as .webm videos for PR review or bug fix verification.
from playwright.sync_api import sync_playwright
import tempfile
from pathlib import Path
video_dir = Path(tempfile.mkdtemp())
with sync_playwright() as pw:
browser = pw.chromium.launch(headless=True)
context = browser.new_context(
viewport={"width": 1400, "height": 900},
record_video_dir=str(video_dir),
record_video_size={"width": 1400, "height": 900},
)
page = context.new_page()
page.goto(f"file:///path/to/test.html")
# ... perform test actions, add pauses for readability ...
page.wait_for_timeout(800) # pause so viewers can see the current state
page.close()
context.close() # video is finalized after context.close()
browser.close()
# Retrieve the recorded video
videos = list(video_dir.glob("*.webm"))
if videos:
videos[0].rename("demo.webm")
Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.