generate_page_object
Create Page Object Model classes for web automation testing. Generates code for Playwright or Selenium frameworks to structure test automation with reusable page elements.
Instructions
Generate a complete Page Object Model class for a webpage. Supports Playwright (TypeScript/JavaScript/Python) and Selenium (Java/Python/C#).
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>",
"className": "<className>"
},
"name": "generate_page_object"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | The URL of the webpage | |
| className | Yes | Name for the Page Object class (e.g., 'LoginPage', 'CheckoutPage') | |
| language | No | Programming language: typescript, javascript, python (Playwright) OR java-selenium, python-selenium, csharp-selenium (Selenium) |