import type { Page, Locator } from '@playwright/test'; export class RecoverPage { readonly page: Page; readonly nameInput: Locator; readonly pinInput: Locator; readonly submitButton: Locator; readonly errorMessage: Locator; constructor(page: Page) { this.page = page; this.nameInput = page.getByTestId('recover-name-input'); this.pinInput = page.getByTestId('recover-pin-input'); this.submitButton = page.getByTestId('recover-submit'); this.errorMessage = page.getByTestId('recover-error'); } async goto() { await this.page.goto('/recover'); } async recover(name: string, pin: string) { await this.nameInput.fill(name); await this.pinInput.fill(pin); await this.submitButton.click(); } }