Generate POM
generate_pomGenerates a functional TypeScript Page Object Model file from a live Playwright accessibility snapshot, optionally opening a headed browser to log in or reach the needed page state first.
Instructions
Generate a functional Page Object Model TypeScript file from a live Playwright accessibility snapshot. Optionally launches a headed browser so you can log in or navigate to the desired state first.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"url": "<url>",
"name": "<name>",
"outputDir": "<outputDir>"
},
"name": "generate_pom"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Starting URL to navigate to | |
| name | Yes | Output name (e.g. "checkout" → checkout.page.ts + checkout.snapshot.yml) | |
| style | No | POM style: factory function (default) or class-based | factory |
| timeout | No | Milliseconds to wait for waitForUrl | |
| outputDir | Yes | Directory to write generated files into | |
| waitForUrl | No | URL glob pattern; when set the browser launches headed so you can manually navigate first |