QA Browser Data Collector
Purpose
Use Playwright MCP to autonomously explore live web applications and collect structured data for test generation. The skill navigates URLs, captures accessibility snapshots, inspects forms, records network traffic, and maps navigation paths—producing a "UI spec" that feeds into test case generators (e.g., qa-testcase-from-docs, qa-playwright-ts-writer).
Trigger Phrases
- "Collect data from [URL]" / "Explore [app URL] and gather UI spec"
- "Capture form fields and validation from [URL]"
- "Map navigation and API calls for [application]"
- "Generate UI spec from live app at [URL]"
- "Browser data collection for test generation"
- "Explore [URL] and extract page structure, forms, and endpoints"
Data Collection Workflow
- Navigate URLs — Open target URLs via Playwright MCP; support multiple entry points (home, login, key flows).
- Capture accessibility snapshots — Use snapshot tools to extract DOM structure, headings, landmarks, interactive elements.
- Collect form fields & validation rules — Identify inputs, selects, textareas; infer types, required/optional, placeholders, validation patterns.
- Record error messages — Trigger validation (e.g., submit empty), capture error text, fallback pages, toast/alert messages.
- Capture API endpoints from network — Intercept or record XHR/fetch requests: endpoints, methods, status codes, payloads.
- Map navigation paths — Extract links, menus, breadcrumbs, routing patterns; document user flow sequences.
- Screenshot pages — Capture key screens for visual reference and test traceability.
- Extract state transitions — Document login/logout, modal open/close, tab switches, conditional visibility.
Collected Data Types
| Category |
Examples |
| Page structure |
DOM tree, headings (h1–h6), landmarks (main, nav, aside), ARIA roles |
| Forms |
Fields (name, type, placeholder, required/optional), validation rules, submit targets |
| Navigation |
Links (href, text), menus, breadcrumbs, routing patterns |
| API calls |
Endpoints, HTTP methods, status codes, request/response payloads |
| Error handling |
Validation messages, error pages, fallbacks, console errors |
| Authentication flows |
Login form, session indicators, token storage, logout paths |
Output Format
Structured "UI spec" suitable for test case generators:
{
"url": "https://example.com/login",
"collectedAt": "ISO8601",
"pages": [
{
"path": "/login",
"title": "Sign In",
"headings": ["Sign In", "Forgot password?"],
"forms": [
{
"id": "login-form",
"fields": [
{ "name": "email", "type": "email", "required": true },
{ "name": "password", "type": "password", "required": true }
],
"submitButton": "Sign In",
"validationMessages": ["Email is required", "Invalid email format"]
}
],
"links": [...],
"apiCalls": [...]
}
],
"navigationPaths": [...],
"authFlow": { "login": "/login", "logout": "/logout" }
}
Markdown output is also supported for human-readable specs. See references/data-collection-checklist.md for a full checklist.
Scope
Can do (autonomous):
- Navigate to provided URLs and follow links within scope
- Capture accessibility snapshots and extract structure
- Inspect forms (fields, types, validation) without submitting real data
- Record network requests (endpoints, methods, status codes)
- Map navigation paths and document user flows
- Take screenshots for reference
- Produce structured JSON/markdown UI spec
- Reference
references/data-collection-checklist.md and references/playwright-mcp-patterns.md
Cannot do (requires confirmation):
- Navigate to URLs not explicitly provided
- Submit forms with real user data (use placeholders/test data only)
- Access authenticated areas without credentials provided by user
- Modify app state beyond read-only exploration
Will not do (out of scope):
- Modify any data in the application — No form submissions with real data, no create/update/delete actions
- Execute tests or assertions
- Generate test code (hand off to qa-playwright-ts-writer or similar)
- Bypass security or access restricted areas without permission
Quality Checklist
Before delivering a UI spec:
Troubleshooting
| Symptom |
Likely Cause |
Fix |
| Snapshot empty or incomplete |
Page not fully loaded, SPA hydration |
Use wait patterns; retry snapshot after load |
| Forms not detected |
Dynamic forms, iframes |
Check for iframes; wait for form visibility |
| API calls not captured |
Network interception not active |
Ensure network recording started before navigation |
| Login required |
Protected area |
Ask user for test credentials or skip authenticated routes |
| Rate limiting / blocking |
Bot detection |
Reduce request frequency; use realistic delays |
| CORS or mixed content |
Cross-origin restrictions |
Document observed behavior; note limitations |
| Element refs stale |
DOM changed between snapshot and action |
Re-snapshot before interaction |
References
references/data-collection-checklist.md — Checklist of data points to collect per page
references/playwright-mcp-patterns.md — Common Playwright MCP patterns for data collection
1---2name: qa-browser-data-collector3description: Autonomously explore live web applications using Playwright MCP to collect page structure, form fields, validation rules, API endpoints, and user flows for test case generation.4---56# QA Browser Data Collector78## Purpose910Use Playwright MCP to autonomously explore live web applications and collect structured data for test generation. The skill navigates URLs, captures accessibility snapshots, inspects forms, records network traffic, and maps navigation paths—producing a "UI spec" that feeds into test case generators (e.g., qa-testcase-from-docs, qa-playwright-ts-writer).1112## Trigger Phrases1314- "Collect data from [URL]" / "Explore [app URL] and gather UI spec"15- "Capture form fields and validation from [URL]"16- "Map navigation and API calls for [application]"17- "Generate UI spec from live app at [URL]"18- "Browser data collection for test generation"19- "Explore [URL] and extract page structure, forms, and endpoints"2021## Data Collection Workflow22231. **Navigate URLs** — Open target URLs via Playwright MCP; support multiple entry points (home, login, key flows).242. **Capture accessibility snapshots** — Use snapshot tools to extract DOM structure, headings, landmarks, interactive elements.253. **Collect form fields & validation rules** — Identify inputs, selects, textareas; infer types, required/optional, placeholders, validation patterns.264. **Record error messages** — Trigger validation (e.g., submit empty), capture error text, fallback pages, toast/alert messages.275. **Capture API endpoints from network** — Intercept or record XHR/fetch requests: endpoints, methods, status codes, payloads.286. **Map navigation paths** — Extract links, menus, breadcrumbs, routing patterns; document user flow sequences.297. **Screenshot pages** — Capture key screens for visual reference and test traceability.308. **Extract state transitions** — Document login/logout, modal open/close, tab switches, conditional visibility.3132## Collected Data Types3334| Category | Examples |35|----------|----------|36| **Page structure** | DOM tree, headings (h1–h6), landmarks (main, nav, aside), ARIA roles |37| **Forms** | Fields (name, type, placeholder, required/optional), validation rules, submit targets |38| **Navigation** | Links (href, text), menus, breadcrumbs, routing patterns |39| **API calls** | Endpoints, HTTP methods, status codes, request/response payloads |40| **Error handling** | Validation messages, error pages, fallbacks, console errors |41| **Authentication flows** | Login form, session indicators, token storage, logout paths |4243## Output Format4445Structured "UI spec" suitable for test case generators:4647```json48{49 "url": "https://example.com/login",50 "collectedAt": "ISO8601",51 "pages": [52 {53 "path": "/login",54 "title": "Sign In",55 "headings": ["Sign In", "Forgot password?"],56 "forms": [57 {58 "id": "login-form",59 "fields": [60 { "name": "email", "type": "email", "required": true },61 { "name": "password", "type": "password", "required": true }62 ],63 "submitButton": "Sign In",64 "validationMessages": ["Email is required", "Invalid email format"]65 }66 ],67 "links": [...],68 "apiCalls": [...]69 }70 ],71 "navigationPaths": [...],72 "authFlow": { "login": "/login", "logout": "/logout" }73}74```7576Markdown output is also supported for human-readable specs. See `references/data-collection-checklist.md` for a full checklist.7778## Scope7980**Can do (autonomous):**81- Navigate to provided URLs and follow links within scope82- Capture accessibility snapshots and extract structure83- Inspect forms (fields, types, validation) without submitting real data84- Record network requests (endpoints, methods, status codes)85- Map navigation paths and document user flows86- Take screenshots for reference87- Produce structured JSON/markdown UI spec88- Reference `references/data-collection-checklist.md` and `references/playwright-mcp-patterns.md`8990**Cannot do (requires confirmation):**91- Navigate to URLs not explicitly provided92- Submit forms with real user data (use placeholders/test data only)93- Access authenticated areas without credentials provided by user94- Modify app state beyond read-only exploration9596**Will not do (out of scope):**97- **Modify any data in the application** — No form submissions with real data, no create/update/delete actions98- Execute tests or assertions99- Generate test code (hand off to qa-playwright-ts-writer or similar)100- Bypass security or access restricted areas without permission101102## Quality Checklist103104Before delivering a UI spec:105106- [ ] All target URLs explored per user scope107- [ ] Page structure captured (headings, landmarks, key elements)108- [ ] Forms documented with field types, required/optional, validation109- [ ] API endpoints recorded with method, path, and status110- [ ] Navigation paths mapped (links, menus, flows)111- [ ] Error/validation messages captured where applicable112- [ ] Screenshots taken for key pages113- [ ] Output format valid (JSON or markdown)114- [ ] No real user data submitted or stored115- [ ] Scope boundaries respected (no unintended modifications)116117## Troubleshooting118119| Symptom | Likely Cause | Fix |120|---------|--------------|-----|121| Snapshot empty or incomplete | Page not fully loaded, SPA hydration | Use wait patterns; retry snapshot after load |122| Forms not detected | Dynamic forms, iframes | Check for iframes; wait for form visibility |123| API calls not captured | Network interception not active | Ensure network recording started before navigation |124| Login required | Protected area | Ask user for test credentials or skip authenticated routes |125| Rate limiting / blocking | Bot detection | Reduce request frequency; use realistic delays |126| CORS or mixed content | Cross-origin restrictions | Document observed behavior; note limitations |127| Element refs stale | DOM changed between snapshot and action | Re-snapshot before interaction |128129## References130131- `references/data-collection-checklist.md` — Checklist of data points to collect per page132- `references/playwright-mcp-patterns.md` — Common Playwright MCP patterns for data collection