{
    "url": "https://delaparra-services.nl/skills/webapp-testing",
    "locale": "en",
    "title": "Web Application Testing | DeLaParra Services",
    "description": "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.",
    "alternates": {
        "en": "https://delaparra-services.nl/skills/webapp-testing",
        "nl": "https://delaparra-services.nl/nl/skills/webapp-testing"
    },
    "formats": {
        "csv": "https://delaparra-services.nl/skills/webapp-testing.csv",
        "md": "https://delaparra-services.nl/skills/webapp-testing.md",
        "json": "https://delaparra-services.nl/skills/webapp-testing.json",
        "zip": "https://delaparra-services.nl/skills/webapp-testing.zip",
        "pdf": "https://delaparra-services.nl/skills/webapp-testing.pdf"
    },
    "downloads": [
        {
            "url": "https://delaparra-services.nl/skills/webapp-testing.csv",
            "encodingFormat": "text/csv",
            "name": "webapp-testing.csv"
        },
        {
            "url": "https://delaparra-services.nl/skills/webapp-testing.json",
            "encodingFormat": "application/json",
            "name": "webapp-testing.json"
        },
        {
            "url": "https://delaparra-services.nl/skills/webapp-testing.md",
            "encodingFormat": "text/markdown",
            "name": "webapp-testing.md"
        },
        {
            "url": "https://delaparra-services.nl/skills/webapp-testing.pdf",
            "encodingFormat": "application/pdf",
            "name": "webapp-testing.pdf"
        },
        {
            "url": "https://delaparra-services.nl/skills/webapp-testing.zip",
            "encodingFormat": "application/zip",
            "name": "webapp-testing.zip"
        },
        {
            "url": "https://delaparra-services.nl/skills/webapp-testing/download",
            "encodingFormat": "application/zip",
            "name": "webapp-testing-files.zip"
        }
    ],
    "markdown": "# Web Application Testing\n\n \n\nToolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.\n\n \n\n**Licence** Apache-2.0\n\n \n\n**Source** anthropics/skills\n\n \n\n**This skill contains executable scripts.**\n\n [Download zip](<https://delaparra-services.nl/skills/webapp-testing/download>)   \n\n# Web Application Testing\n\n \n\nTo test local web applications, write native Python Playwright scripts.\n\n \n\n**Helper Scripts Available**:\n\n \n\n- ` scripts/with_server.py ` - Manages server lifecycle (supports multiple servers)\n\n \n\n**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.\n\n \n\n## Decision Tree: Choosing Your Approach\n\n \n\n```\nUser task → Is it static HTML?\n    ├─ Yes → Read HTML file directly to identify selectors\n    │         ├─ Success → Write Playwright script using selectors\n    │         └─ Fails/Incomplete → Treat as dynamic (below)\n    │\n    └─ No (dynamic webapp) → Is the server already running?\n        ├─ No → Run: python scripts/with_server.py --help\n        │        Then use the helper + write simplified Playwright script\n        │\n        └─ Yes → Reconnaissance-then-action:\n            1. Navigate and wait for networkidle\n            2. Take screenshot or inspect DOM\n            3. Identify selectors from rendered state\n            4. Execute actions with discovered selectors\n```\n\n \n\n## Example: Using with\\_server.py\n\n \n\nTo start a server, run ` --help ` first, then use the helper:\n\n \n\n**Single server:**\n\n \n\n```\npython scripts/with_server.py --server \"npm run dev\" --port 5173 -- python your_automation.py\n```\n\n \n\n**Multiple servers (e.g., backend + frontend):**\n\n \n\n```\npython scripts/with_server.py \\\n  --server \"cd backend && python server.py\" --port 3000 \\\n  --server \"cd frontend && npm run dev\" --port 5173 \\\n  -- python your_automation.py\n```\n\n \n\nTo create an automation script, include only Playwright logic (servers are managed automatically):\n\n \n\n```\nfrom playwright.sync_api import sync_playwright\n\nwith sync_playwright() as p:\n    browser = p.chromium.launch(headless=True) # Always launch chromium in headless mode\n    page = browser.new_page()\n    page.goto('http://localhost:5173') # Server already running and ready\n    page.wait_for_load_state('networkidle') # CRITICAL: Wait for JS to execute\n    # ... your automation logic\n    browser.close()\n```\n\n \n\n## Reconnaissance-Then-Action Pattern\n\n \n\n1. **Inspect rendered DOM**:\n\n \n\n```\npage.screenshot(path='/tmp/inspect.png', full_page=True)\ncontent = page.content()\npage.locator('button').all()\n``` \n1. **Identify selectors** from inspection results \n1. **Execute actions** using discovered selectors\n\n \n\n## Common Pitfall\n\n \n\n❌ **Don't** inspect the DOM before waiting for ` networkidle ` on dynamic apps ✅ **Do** wait for ` page.wait_for_load_state('networkidle') ` before inspection\n\n \n\n## Best Practices\n\n \n\n- **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. \n- Use ` sync_playwright() ` for synchronous scripts \n- Always close the browser when done \n- Use descriptive selectors: ` text= `, ` role= `, CSS selectors, or IDs \n- Add appropriate waits: ` page.wait_for_selector() ` or ` page.wait_for_timeout() `\n\n \n\n## Reference Files\n\n \n\n- **examples/** - Examples showing common patterns: \n\n- ` element_discovery.py ` - Discovering buttons, links, and inputs on a page \n- ` static_html_automation.py ` - Using file:// URLs for local HTML \n- ` console_logging.py ` - Capturing console logs during automation\n\n \n\n## Files\n\n \n\n- ` LICENSE.txt ` \n- ` SKILL.md ` \n- ` SOURCE.md ` \n- ` examples/console_logging.py ` \n- ` examples/element_discovery.py ` \n- ` examples/static_html_automation.py ` \n- ` scripts/with_server.py `\n\n \n\n## Related terms\n\n \n\n- [Stub](<https://delaparra-services.nl/knowledge-hub/stub>)\n\n \n\n[Installing an agent skill in Claude Code, Codex, Cursor and Copilot](<https://delaparra-services.nl/manuals/een-skill-installeren-in-je-ai-assistent>)\n\n[HTML version](https://delaparra-services.nl/skills/webapp-testing)\n",
    "structured_data": {
        "@context": "https://schema.org",
        "@graph": [
            {
                "@type": "Organization",
                "@id": "https://delaparra-services.nl/#practice",
                "logo": "https://delaparra-services.nl/logo.png",
                "name": "DeLaParra Services",
                "legalName": "DeLaParra Services",
                "url": "https://delaparra-services.nl/",
                "description": "Bespoke software, web applications and mobile apps, developed in Laravel by a single developer in Groningen. Fixed price agreed in advance, full source code provided upon delivery.",
                "email": "info@delaparra-services.nl",
                "address": {
                    "@type": "PostalAddress",
                    "addressLocality": "Groningen",
                    "addressRegion": "Groningen",
                    "addressCountry": "NL"
                },
                "areaServed": "Groningen, the Netherlands",
                "knowsLanguage": [
                    "en",
                    "nl"
                ],
                "knowsAbout": [
                    "Web design and development",
                    "App development",
                    "Custom software and web applications",
                    "OpenSpec",
                    "AI code review",
                    "Your own coding agent"
                ],
                "founder": {
                    "@id": "https://delaparra-services.nl/#person"
                }
            },
            {
                "@type": "WebPage",
                "@id": "https://delaparra-services.nl/skills/webapp-testing#webpage",
                "url": "https://delaparra-services.nl/skills/webapp-testing",
                "name": "Web Application Testing | DeLaParra Services",
                "description": "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.",
                "isPartOf": {
                    "@id": "https://delaparra-services.nl/#website"
                },
                "about": {
                    "@id": "https://delaparra-services.nl/#practice"
                },
                "inLanguage": "en",
                "breadcrumb": {
                    "@id": "https://delaparra-services.nl/skills/webapp-testing#breadcrumb"
                }
            },
            {
                "@type": "BreadcrumbList",
                "@id": "https://delaparra-services.nl/skills/webapp-testing#breadcrumb",
                "itemListElement": [
                    {
                        "@type": "ListItem",
                        "position": 1,
                        "name": "Home",
                        "item": "https://delaparra-services.nl/"
                    },
                    {
                        "@type": "ListItem",
                        "position": 2,
                        "name": "Web Application Testing"
                    }
                ]
            },
            {
                "@type": "Person",
                "@id": "https://delaparra-services.nl/#person",
                "name": "Reinier de la Parra",
                "url": "https://delaparra-services.nl/about"
            },
            {
                "@type": "SoftwareSourceCode",
                "@id": "https://delaparra-services.nl/skills/webapp-testing#skill",
                "url": "https://delaparra-services.nl/skills/webapp-testing",
                "name": "Web Application Testing",
                "description": "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.",
                "inLanguage": "en",
                "license": "https://spdx.org/licenses/Apache-2.0.html",
                "subjectOf": {
                    "@id": "https://delaparra-services.nl/skills/webapp-testing#dataset"
                }
            },
            {
                "@type": "Dataset",
                "@id": "https://delaparra-services.nl/skills/webapp-testing#dataset",
                "name": "Web Application Testing",
                "description": "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.",
                "url": "https://delaparra-services.nl/skills/webapp-testing",
                "identifier": "https://delaparra-services.nl/skills/webapp-testing#dataset",
                "about": {
                    "@id": "https://delaparra-services.nl/skills/webapp-testing#skill"
                },
                "creditText": "anthropics/skills",
                "publisher": {
                    "@id": "https://delaparra-services.nl/#practice"
                },
                "license": "https://spdx.org/licenses/Apache-2.0.html",
                "isAccessibleForFree": true,
                "inLanguage": "en",
                "dateModified": "2026-11-28T14:00:12+00:00",
                "isPartOf": {
                    "@type": "Dataset",
                    "@id": "https://delaparra-services.nl/knowledge-hub#skills",
                    "name": "Skills for AI coding assistants",
                    "url": "https://delaparra-services.nl/knowledge-hub"
                },
                "includedInDataCatalog": {
                    "@type": "DataCatalog",
                    "@id": "https://delaparra-services.nl/knowledge-hub#catalog",
                    "name": "Knowledge hub data catalog",
                    "url": "https://delaparra-services.nl/knowledge-hub"
                },
                "distribution": [
                    {
                        "@type": "DataDownload",
                        "name": "webapp-testing.csv",
                        "encodingFormat": "text/csv",
                        "contentUrl": "https://delaparra-services.nl/skills/webapp-testing.csv",
                        "inLanguage": "en",
                        "dateModified": "2026-11-28T14:00:12+00:00",
                        "license": "https://spdx.org/licenses/Apache-2.0.html"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "webapp-testing.json",
                        "encodingFormat": "application/json",
                        "contentUrl": "https://delaparra-services.nl/skills/webapp-testing.json",
                        "inLanguage": "en",
                        "dateModified": "2026-11-28T14:00:12+00:00",
                        "license": "https://spdx.org/licenses/Apache-2.0.html"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "webapp-testing.md",
                        "encodingFormat": "text/markdown",
                        "contentUrl": "https://delaparra-services.nl/skills/webapp-testing.md",
                        "inLanguage": "en",
                        "dateModified": "2026-11-28T14:00:12+00:00",
                        "license": "https://spdx.org/licenses/Apache-2.0.html"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "webapp-testing.pdf",
                        "encodingFormat": "application/pdf",
                        "contentUrl": "https://delaparra-services.nl/skills/webapp-testing.pdf",
                        "inLanguage": "en",
                        "dateModified": "2026-11-28T14:00:12+00:00",
                        "license": "https://spdx.org/licenses/Apache-2.0.html"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "webapp-testing.zip",
                        "encodingFormat": "application/zip",
                        "contentUrl": "https://delaparra-services.nl/skills/webapp-testing.zip",
                        "inLanguage": "en",
                        "dateModified": "2026-11-28T14:00:12+00:00",
                        "license": "https://spdx.org/licenses/Apache-2.0.html"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "webapp-testing-files.zip",
                        "encodingFormat": "application/zip",
                        "contentUrl": "https://delaparra-services.nl/skills/webapp-testing/download",
                        "inLanguage": "en",
                        "dateModified": "2026-11-28T14:00:12+00:00",
                        "license": "https://spdx.org/licenses/Apache-2.0.html"
                    }
                ]
            }
        ]
    }
}