OBA Website automated using playwright
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

45 lines
1.3 KiB

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']";
this.forgotPassword = "//a[normalize-space()='Forgot Password ?']";
this.backToLogin="//a[normalize-space()='Back to Login']";
}
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();
await this.page.waitForTimeout(5000);
}
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();
}
async forgetPasswordLink(){
await this.page.locator(this.forgotPassword).click();
}
async backToLoginLink(){
await this.page.locator(this.backToLogin).click();
}
}