webapp-testing
NickCrew/claude-cortex
Playwright를 사용하여 로컬 웹 애플리케이션과 상호작용하고 테스트하기 위한 툴킷입니다. 프론트엔드 기능 검증, UI 동작 디버깅, 브라우저 스크린샷 캡처, 브라우저 로그 확인 시에 사용하십시오.
...모든 것을 확장하십시오소개 webapp-testing
'webapp-testing' 스킬은 Playwright를 사용하여 로컬 웹 애플리케이션과 상호작용하고 테스트할 수 있는 포괄적인 툴킷을 제공합니다. 이 스킬은 프론트엔드 기능 테스트를 간소화하도록 설계되어, 개발자와 테스터가 사용자 인터페이스를 검증하고, 동작을 디버깅하며, 브라우저 스크린샷을 캡처하고, 브라우저 로그를 모니터링하는 작업을 더 쉽게 수행할 수 있도록 돕습니다. 이 스킬은 웹 애플리케이션이 예상대로 동작하는지 확인해야 하는 모든 사용자에게 필수적이며, 특히 페이지 내 다양한 요소에 대한 세심한 검토와 상호작용이 필요한 동적 환경에서 더욱 유용합니다.
자주 묻는 질문
헬퍼 스크립트는 어떻게 실행하나요?
헬퍼 스크립트를 실행하려면 항상 먼저 '--help' 플래그를 사용하십시오. 그러면 사용법이 표시됩니다. 예를 들어, 'python scripts/with_server.py --help'를 실행하여 서버 수명 주기를 관리하는 방법을 확인할 수 있습니다.
이 도구를 정적 및 동적 웹 애플리케이션 모두에 사용할 수 있나요?
네, 이 도구는 정적 HTML 페이지와 동적 웹 애플리케이션 모두에 적합합니다. 이 툴킷은 정적 앱의 경우 HTML을 직접 읽는 방법, 동적 앱의 경우 서버 수명 주기를 관리하는 방법 등 각 유형을 처리하기 위한 구체적인 단계를 제공합니다.
특별한 호환성 요구 사항이 있나요?
이 스킬을 사용하려면 Python과 Playwright가 설치되어 있어야 하며, 로컬 웹 애플리케이션에서 사용하도록 설계되었습니다. 백엔드 및 프론트엔드 테스트를 위해 여러 서버를 동시에 실행하는 등 다양한 구성을 지원합니다.
이 스킬을 사용할 때 흔히 발생하는 실수는 무엇인가요?
흔히 저지르는 실수 중 하나는 페이지가 완전히 로드되었는지 확인하기 전에 DOM을 검사하는 것입니다. 페이지를 검사하거나 상호작용하기 전에 항상 'page.wait_for_load_state('networkidle')'을 사용하여 'networkidle' 상태가 될 때까지 기다려야 합니다.
서버를 수동으로 관리해야 하나요?
아니요, 'scripts/with_server.py'가 서버의 수명 주기를 자동으로 관리해 줍니다. 수동 설정 없이도 백엔드 및 프론트엔드 테스트에 필요한 만큼 여러 대의 서버를 실행할 수 있습니다.
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 selectorsExample: 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.pyMultiple 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_playwrightwith 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
Inspect rendered DOM:
page.screenshot(path='/tmp/inspect.png', full_page=True)content = page.content()page.locator('button').all()
Identify selectors from inspection results
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--helpto 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()orpage.wait_for_timeout()
Reference Files
- examples/ - Examples showing common patterns:
element_discovery.py- Discovering buttons, links, and inputs on a pagestatic_html_automation.py- Using file:// URLs for local HTMLconsole_logging.py- Capturing console logs during automation
webapp-testing 설치
스킬 파일을 다운로드하여 .claude/skills/ 디렉터리에 압축을 풀어주세요.
ZIP 다운로드저장소를 클론하고 스킬 파일을 프로젝트에 복사하세요.
git clone https://github.com/NickCrew/Claude-Cortex/blob/main/skills/webapp-testing/SKILL.md # Copy SKILL.md to your .claude/skills/ directory
복사





집
