import { type Page, type Locator } from "@playwright/test"; /** Account creation within the business partner's customer or supplier tab. */ export class SupplierCreateFormPage { readonly companySelect: Locator; readonly codeInput: Locator; readonly nameInput: Locator; readonly submitButton: Locator; readonly page: Page; constructor(page: Page) { this.page = page; this.companySelect = page.getByRole("combobox", { name: "Our legal entity", exact: true }); this.codeInput = page.getByLabel("Account code", { exact: true }); this.nameInput = page.getByLabel("Account name", { exact: true }); this.submitButton = page.getByRole("button", { name: "Save", exact: true }); } async selectFirstCompany() { await this.companySelect.click(); await this.page.getByRole("option").first().click(); } }