import { Locator, Page } from 'playwright-core' class ProfilePage { page: Page inputDepartment: Locator inputDesignation: Locator btnAboutOrgUpdate: Locator constructor (page: Page) { this.page = page this.inputDepartment = page.locator('[placeholder="Department"]') this.inputDesignation = page.locator('[placeholder="Designation"]') this.btnAboutOrgUpdate = page.locator('//*[@id="root"]/div[1]/div[2]/div/div[6]/div[2]/div[4]/div') } async updateOrgInfo ({ department, designation }) { await this.inputDepartment.fill(department) await this.inputDesignation.fill(designation) await this.btnAboutOrgUpdate.click() } } export default ProfilePage