POM ARCHITECTSimulated Sandbox

POM & Spec Generator

Scan page structure, customize element locators in a checklist, build custom Page Object methods, and generate structured specs.

Page Configuration

Scanned Elements (4 / 4)

POMVar NameElement TagLocator Strategy
input<input id="username" name="username" placeholder="Email address" />
input<input id="password" name="password" type="password" />
input<input id="remember" type="checkbox" />
button<button class="btn-submit" type="submit">Log in</button>

Page Object Action Methods (1)

async login(username, password)
3 steps defined
PLAYWRIGHT TS
import { Page, Locator } from '@playwright/test';

export class LoginFormPage {
  readonly page: Page;
  readonly usernameInput: Locator;
  readonly passwordInput: Locator;
  readonly rememberCheckbox: Locator;
  readonly loginButton: Locator;

  constructor(page: Page) {
    this.page = page;
    this.usernameInput = page.locator("#username");
    this.passwordInput = page.locator("#password");
    this.rememberCheckbox = page.getByRole("checkbox", { name: "Remember me" });
    this.loginButton = page.getByRole("button", { name: "Log in" });
  }

  async navigate() {
    await this.page.goto('/practice/login-form');
  }

  async login(username, password) {
    await this.usernameInput.fill(username);
    await this.passwordInput.fill(password);
    await this.loginButton.click();
  }
}