exports.UserPage=
|
|
class UserPage {
|
|
|
|
constructor(page) {
|
|
this.page = page;
|
|
this.Users = "//span[normalize-space()='Users']";
|
|
this.activeUserButton = "//span[@class='flip-indecator']";
|
|
this.enableButton = "//button[@id='66eaa9656b2f4a3d52a42549']";
|
|
|
|
//AssertionForAPI
|
|
this.userNameAPI="//td[normalize-space()='DAYA']";
|
|
this.userPhoneAPI="//td[normalize-space()='919480111111']";
|
|
this.userEmailAPI="//td[normalize-space()='Daya1234@gmail.com']";
|
|
this.merchantCode="//a[normalize-space()='919480707707']";
|
|
this.addressAPI="//td[normalize-space()='777777,India,chennai']";
|
|
|
|
//Assertion for address
|
|
this.addressList="//td[normalize-space()='35, Mount Main Road , Tamil Nadu, 123111']";
|
|
|
|
|
|
this.addressPatch="//td[normalize-space()='35, Mount Kitchen Main Road, Tamil Nadu, 123111']";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
async userPageButton(){
|
|
await this.page.locator(this.Users).click();
|
|
|
|
}
|
|
async activeUserButtonCheck(){
|
|
await this.page.locator(this.Users).click();
|
|
await this.page.locator(this.activeUserButton).click();
|
|
// const text =await this.page.locator("button:active").allInnerTexts();
|
|
console.log(text);
|
|
|
|
}
|
|
async activeUserButtonEdit(){
|
|
await this.page.locator(this.Users).click();
|
|
await this.page.locator(this.activeUserButton).click();
|
|
await this.page.locator(this.enableButton).click();
|
|
|
|
|
|
}
|
|
|
|
async userAPI(){
|
|
await this.page.locator(this.Users).click();
|
|
}
|
|
|
|
async addressListAPI(){
|
|
await this.page.locator(this.Users).click();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|