Untitled
unknown
plain_text
2 years ago
978 B
15
Indexable
async login(accountName: string): Promise<void> {
for (const data of dataInfo.user) {
if (data.account === accountName) {
if (data.password) {
console.log("Login with email: " + data.email + " and password: " + data.password);
await (await this.getLocator(this.field_Email)).fill(data.email);
await (await this.getLocator(this.button_Next)).click();
await this.waitForLoadStateWithNetworkidleOption();
await (await this.getLocator(this.field_Password)).fill(data.password);
await (await this.getLocator(this.button_Next)).click();
await this.waitLoadingBar(TimeWait.waitLoadPage);
await this.page.waitForLoadState("networkidle");
await this.waitForLoadStateWithNetworkidleOption();
break;
} else {
console.log("Please set Password of " + data.userName);
}
} else {
console.log("No Account matched");
}
}
}Editor is loading...
Leave a Comment