본문으로 건너뛰기
cccskills
무료GitHub에 공개

playwright-screen-recording

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

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

연동 도구Playwright
설치 방법 보기

포함된 파일(1)

  • SKILL.md2.8 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

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

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

page.click(".some-button")
page.wait_for_timeout(800)  # let viewers see the click effect

page.keyboard.press("ArrowRight")
page.wait_for_timeout(600)  # let viewers see the navigation result

Combine assertions with terminal logging

state = get_nav_state(page)
print(f"[1] Title: {state['title']}")
print(f"    prev disabled: {state['prevDisabled']}  (expected: True)")
assert state["prevDisabled"] is True
print("    PASS")

Terminal output paired with the recorded video provides dual verification.

Prefer real data

Use existing real trace data from the project rather than synthetic data for more convincing demos:

# Build test HTML from a real trace file
records = []
with open(".traces/trace_xxx.jsonl") as f:
    for line in f:
        # Escape </script> to prevent breaking the HTML script block
        records.append(line.strip().replace("</script>", '</scr" + "ipt>'))

Notes

  • Video format is .webm (VP8 codec), supported by most players and browsers
  • Each page produces a separate video file
  • record_video_size controls video resolution — keep it consistent with viewport
  • Recording works in headless mode, no display required
  • Video files are typically a few hundred KB, suitable for attaching to PRs or chat

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Run PR-grade real Codex E2E validation through claude-tap, including resume turns, multiple tool calls, optional image input, viewer verification, and screenshot evidence.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

liaohch3/claude-tap3.3천2026년 10월 20일 업데이트

Generate demo assets (GIF/MP4) from real tmux E2E runs and viewer screenshots using asciinema and Playwright

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

liaohch3/claude-tap3.3천2026년 10월 20일 업데이트

e2e-test

무료

Run claude-tap end-to-end tests with pytest

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

liaohch3/claude-tap3.3천2026년 10월 20일 업데이트

Test JS logic embedded in HTML using two-layer strategy - Python unit tests + Playwright browser integration tests

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

liaohch3/claude-tap3.3천2026년 10월 20일 업데이트

Validate maintainer docs structure, standards freshness, manifest paths, and plan state. Run this after modifying any file under .agents/docs/standards/, .agents/docs/plans/, .agents/docs/architecture/, or AGENTS.md — it catches stale metadata, broken manifest paths, and plan state drift before CI does.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

liaohch3/claude-tap3.3천2026년 10월 20일 업데이트

Full pre-PR merge-readiness check. Run this before opening or merging a pull request — it validates local gates (lint, format, tests), CI status, screenshot evidence, and PR metadata in one pass. Also useful for reviewing an existing PR's readiness.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

liaohch3/claude-tap3.3천2026년 10월 20일 업데이트

liaohch3의 스킬 모두 보기

이 스킬의 문제 신고