Skip to content

AI Page Object Generator

The flagship feature of AutomateX. Generate complete, production-ready Page Objects from any webpage.

What It Does

  1. Analyzes the page structure (forms, buttons, links, inputs, tables)
  2. Identifies the best selector for each element
  3. Generates TypeScript code with full type safety
  4. Creates methods for common interactions

The Output

Given any webpage, AutomateX generates:

Locator Declarations

Every interactive element gets a typed, readonly locator using Playwright's recommended selector strategies.

Getter & Setter Methods

Form fields get automatic type-safe value accessors — getEmail(), setPassword(value), and more.

Action Methods

Buttons and links get dedicated click methods — clickSubmit(), clickForgotPassword().

Workflow Methods

Common patterns are auto-detected and combined into higher-level methods:

Page TypeAuto-Generated Methods
Loginlogin(email, password)
Searchsearch(query)
FormsfillForm(data)
TablesgetRowByText(), getCell(), getRowData()

Selector Intelligence

Not all selectors are equal. AutomateX picks the best one:

PrioritySelector TypeWhy
1data-testidExplicitly for testing, never changes
2role + nameAccessibility-based, stable
3labelSemantic, user-visible
4placeholderUser-visible, fairly stable
5CSSLast resort, may be fragile

Fragile selectors are flagged with warnings so you can improve them.


Duplicate-Safe Generation

AutomateX handles real-world HTML complexity:

  • Duplicate selectors are automatically disambiguated — no two locators share the same selector
  • Duplicate method names get unique suffixes with JSDoc comments for clarity
  • Navigation elements can be filtered out with focus-selector scoping

Enterprise Options

For larger teams, AutomateX supports:

  • Separate Locators File: Keep selectors in dedicated files for easier maintenance
  • Test Data Generation: Auto-generate valid, invalid, and empty test data sets
  • Base Page Pattern: Extend a common BasePage class across all page objects
  • Focus Selector: Scope generation to specific page sections (e.g., main content only)

See It In Action

Request early access to try AutomateX on your own projects.

Request Early Access

Built for QA Engineers