본문으로 건너뛰기
Skillpedia
테스트181k · #652

webapp-testing

하는 일

컴퓨터에서 개발 중인 웹사이트를 테스트하는 도구입니다. 모든 것이 올바르게 작동하는지 확인하고, 화면을 '사진'으로 찍고, 오류 메시지를 볼 수 있습니다.

사용하는 경우

  • ✓웹사이트의 버튼이 제대로 작동하는지 확인하고 싶을 때.
  • ✓웹사이트 모습을 스크린샷으로 찍고 싶을 때.
  • ✓웹사이트에서 발생하는 오류를 확인하고 싶을 때.

스킬 링크

https://github.com/anthropics/skills/blob/main/skills/webapp-testing/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/anthropics/skills/blob/main/skills/webapp-testing/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“제 프로필 페이지의 '저장' 버튼이 작동하는지 확인하고 스크린샷도 찍어 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

작은 Python 프로그램을 작성합니다. 이 도구를 사용해 웹사이트를 열고, 상호작용하며, 모든 것이 기대대로인지 확인합니다. 웹사이트의 서버도 대신 시작할 수 있습니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Web Application Testing

To test local web applications, write native Python Playwright scripts.

Helper Scripts Available:

  • scripts/with_server.py - Manages server lifecycle (supports multiple servers)

Always run scripts with --help first to see usage. DO NOT read the source until you try running the script first and find that a customized solution is abslutely necessary. These scripts can be very large and thus pollute your context window. They exist to be called directly as black-box scripts rather than ingested into your context window.

Decision Tree: Choosing Your Approach

User task → Is it static HTML?
    ├─ Yes → Read HTML file directly to identify selectors
    │         ├─ Success → Write Playwright script using selectors
    │         └─ Fails/Incomplete → Treat as dynamic (below)
    │
    └─ No (dynamic webapp) → Is the server already running?
        ├─ No → Run: python scripts/with_server.py --help
        │        Then use the helper + write simplified Playwright script
        │
        └─ Yes → Reconnaissance-then-action:
            1. Navigate and wait for networkidle
            2. Take screenshot or inspect DOM
            3. Identify selectors from rendered state
            4. Execute actions with discovered selectors

Example: Using with_server.py

To start a server, run --help first, then use the helper:

Single server:

python scripts/with_server.py --server "npm run dev" --port 5173 -- python your_automation.py

Multiple servers (e.g., backend + frontend):

python scripts/with_server.py \
  --server "cd backend && python server.py" --port 3000 \
  --server "cd frontend && npm run dev" --port 5173 \
  -- python your_automation.py

To create an automation script, include only Playwright logic (servers are managed automatically):

from playwright.sync_api import sync_playwright

with sync_playwright() as p:
    browser = p.chromium.launch(headless=True) # Always launch chromium in headless mode
    page = browser.new_page()
    page.goto('http://localhost:5173') # Server already running and ready
    page.wait_for_load_state('networkidle') # CRITICAL: Wait for JS to execute
    # ... your automation logic
    browser.close()

Reconnaissance-Then-Action Pattern

  1. Inspect rendered DOM:

    page.screenshot(path='/tmp/inspect.png', full_page=True)
    content = page.content()
    page.locator('button').all()
    
  2. Identify selectors from inspection results

  3. Execute actions using discovered selectors

Common Pitfall

❌ Don't inspect the DOM before waiting for networkidle on dynamic apps ✅ Do wait for page.wait_for_load_state('networkidle') before inspection

Best Practices

  • Use bundled scripts as black boxes - To accomplish a task, consider whether one of the scripts available in scripts/ can help. These scripts handle common, complex workflows reliably without cluttering the context window. Use --help to see usage, then invoke directly.
  • Use sync_playwright() for synchronous scripts
  • Always close the browser when done
  • Use descriptive selectors: text=, role=, CSS selectors, or IDs
  • Add appropriate waits: page.wait_for_selector() or page.wait_for_timeout()

Reference Files

  • examples/ - Examples showing common patterns:
    • element_discovery.py - Discovering buttons, links, and inputs on a page
    • static_html_automation.py - Using file:// URLs for local HTML
    • console_logging.py - Capturing console logs during automation
자주 묻는 질문

'headless'는 무엇을 뜻하나요?

브라우저가 화면에 창을 띄우지 않고 배경에서 실행되어 작업을 자동화한다는 뜻입니다.

왜 `networkidle`을 기다려야 하나요?

웹사이트가 모든 정보와 애니메이션을 다 불러온 뒤에 상호작용하거나 확인하도록 보장하기 위해서입니다.

'selectors'는 무엇인가요?

도구가 웹사이트의 특정 버튼, 텍스트, 입력란을 찾기 위해 사용하는 주소와 같습니다.

상세 정보

작성자의 원본 설명

Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.

repo: anthropics/skills

인기도

GitHub 스타
181k
순위
#652
라이선스
—
업데이트
2026. 10. 9.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬