playwright-screen-recording

Solid

Record browser test videos with Playwright for PR review and bug fix verification

Code & Development 1,021 stars 109 forks Updated today MIT

Install

View on GitHub

Quality Score: 96/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Playwright Screen Recording for Test Verification Use Playwright's video recording to capture headless browser operations as .webm videos for PR review or bug fix verification. ## Core Usage ```python 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") ``` ## Use Cases - **Bug fix verification**: record before/after comparisons showing button state changes, UI behavior differences - **PR Review**: attach .webm video so reviewers can visually understand the change - **Regression test evidence**: record critical interaction paths as visual proof of passing tests ## Recording Tips ### Add pauses between actions ```python page.click(".some-button") page.wait_for_timeout(800) # let viewers see the click effe...

Details

Author
liaohch3
Repository
liaohch3/claude-tap
Created
3 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category