Webapp Testing

द्वारा Anthropic

प्लेराइट का उपयोग करके स्थानीय वेब अनुप्रयोगों के साथ बातचीत और परीक्षण के लिए टूलकिट। फ्रंटएंड कार्यक्षमता सत्यापित करने, UI व्यवहार डीबग करने, ब्राउज़र स्क्रीनशॉट कैप्चर करने और ब्राउज़र लॉग देखने में सहायता करता है। लाइसेंस: LICENSE.txt में पूर्ण शर्तें

npx skills add https://github.com/anthropics/skills --skill webapp-testing

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

Anthropic की और Skills

Algorithmic Art
Anthropic
p5.js का उपयोग करके बीजयुक्त यादृच्छिकता और इंटरैक्टिव पैरामीटर अन्वेषण के साथ एल्गोरिदमिक कला बनाना। इसका उपयोग तब करें जब उपयोगकर्ता कोड, जनरेटिव कला, एल्गोरिदमिक कला, फ्लो फील्ड या पार्टिकल सिस्टम का उपयोग करके कला बनाने का अनुरोध करें। कॉपीराइट उल्लंघन से बचने के लिए मौजूदा कलाकारों के काम की नकल करने के बजाय मूल एल्गोरिदमिक कला बनाएं। लाइसेंस: LICENSE.txt में पूर्ण शर्तें
creativeofficial
Brand Guidelines
Anthropic
Anthropic के आधिकारिक ब्रांड रंगों और टाइपोग्राफी को किसी भी ऐसे आर्टिफैक्ट पर लागू करता है जो Anthropic के लुक-एंड-फील से लाभान्वित हो सकता है। इसका उपयोग तब करें जब ब्रांड रंग या शैली दिशानिर्देश, दृश्य स्वरूपण, या कंपनी डिज़ाइन मानक लागू हों। लाइसेंस: LICENSE.txt में पूर्ण शर्तें
creativeofficial
Canvas Design
Anthropic
डिज़ाइन दर्शन का उपयोग करके .png और .pdf दस्तावेज़ों में सुंदर दृश्य कला बनाएं। इस कौशल का उपयोग तब करें जब उपयोगकर्ता कोई पोस्टर, कला का टुकड़ा, डिज़ाइन या अन्य स्थिर कृति बनाने के लिए कहे। कॉपीराइट उल्लंघन से बचने के लिए मौलिक दृश्य डिज़ाइन बनाएं, कभी भी मौजूदा कलाकारों के काम की नकल न करें। लाइसेंस: LICENSE.txt में पूर्ण शर्तें
creativeofficial
Docx
Anthropic
व्यापक दस्तावेज़ निर्माण, संपादन और विश्लेषण जिसमें ट्रैक किए गए परिवर्तनों, टिप्पणियों, स्वरूपण संरक्षण और पाठ निष्कर्षण का समर्थन शामिल है। जब क्लॉड को पेशेवर दस्तावेज़ों (.docx फ़ाइलों) के साथ काम करने की आवश्यकता हो: (1) नए दस्तावेज़ बनाना, (2) सामग्री को संशोधित या संपादित करना, (3) ट्रैक किए गए परिवर्तनों के साथ काम करना, (4) टिप्पणियाँ जोड़ना, या कोई अन्य दस्तावेज़ कार्य लाइसेंस: स्वामित
documentofficial
Frontend Design
Anthropic
अद्वितीय, उत्पादन-ग्रेड फ्रंटएंड इंटरफेस उत्पन्न करता है जो सामान्य AI सौंदर्यशास्त्र से बचता है।
developmentfeaturedofficial
Internal Comms
Anthropic
आंतरिक संचार लिखने में मेरी सहायता करने के लिए संसाधनों का एक सेट, जो मेरी कंपनी द्वारा पसंद किए जाने वाले प्रारूपों का उपयोग करता है। क्लॉड को इस कौशल का उपयोग तब करना चाहिए जब भी किसी प्रकार का आंतरिक संचार (स्थिति रिपोर्ट, नेतृत्व अपडेट, तृतीय-पक्ष अपडेट, कंपनी न्यूज़लेटर, सामान्य प्रश्न, घटना रिपोर्ट, परियोजना अपडेट आदि) लिखने के लिए कहा जाए। लाइसेंस: LICENSE.txt में पूर्ण शर्तें
official
MCP Builder
Anthropic
उच्च गुणवत्ता वाले MCP (मॉडल कॉन्टेक्स्ट प्रोटोकॉल) सर्वर बनाने के लिए मार्गदर्शिका जो LLMs को अच्छी तरह से डिज़ाइन किए गए टूल के माध्यम से बाहरी सेवाओं के साथ इंटरैक्ट करने में सक्षम बनाती है। Python (FastMCP) या Node/TypeScript (MCP SDK) में बाहरी APIs या सेवाओं को एकीकृत करने के लिए MCP सर्वर बनाते समय उपयोग करें। लाइसेंस: LICENSE.txt में पूर्ण शर्तें
developmentofficial
Artifacts Builder
Anthropic
आधुनिक फ्रंटएंड वेब तकनीकों (React, Tailwind CSS, shadcn/ui) का उपयोग करके विस्तृत, बहु-घटक claude.ai HTML आर्टिफैक्ट बनाने के लिए उपकरणों का सूट। जटिल आर्टिफैक्ट के लिए उपयोग करें जिनमें स्थिति प्रबंधन, रूटिंग, या shadcn/ui घटकों की आवश्यकता हो - सरल एकल-फ़ाइल HTML/JSX आर्टिफैक्ट के लिए नहीं। लाइसेंस: LICENSE.txt में पूर्ण शर्तें
development