exports.LoginPage= class LoginPage { constructor(page) { this.page = page; this.usernameInput = "//input[@name='oba_login_emailid']"; this.passwordInput = "//input[@placeholder='Password']"; this.signinButton = "//button[normalize-space()='SIGN IN']"; } async gotoLoginPage(){ await this.page.goto('https://jaicrm1.orderbookings.com/login/'); } async login(username, password){ await this.page.locator(this.usernameInput).fill(username); await this.page.locator(this.passwordInput).fill(password); await this.page.locator(this.signinButton).click(); } async loginWithCrtPassword(){ await this.page.fill(this.usernameInput,'rabisundaram@gmail.com'); await this.page.locator(this.passwordInput).fill('#12345678A'); await this.page.locator(this.signinButton).click(); } }