import { type Page, type Locator } from "@playwright/test"; export class SiteEditFormPage { readonly page: Page; readonly nameInput: Locator; readonly typeSelect: Locator; readonly streetInput: Locator; readonly cityInput: Locator; readonly stateInput: Locator; readonly postalCodeInput: Locator; readonly countrySelect: Locator; readonly timezoneSelect: Locator; readonly submitButton: Locator; readonly cancelButton: Locator; constructor(page: Page) { this.page = page; // The edit form renders FormLabel text as "Name *" and "Type *" (with // asterisk suffix). Use exact: false so getByLabel matches the prefix. this.nameInput = page.getByLabel("Name", { exact: false }); // Type is a Select (Base UI) component — FormControl's Slot forwards the id // to the Select's outer wrapper
, not to the trigger