generated more action before validating rdv
This commit is contained in:
@@ -588,10 +588,12 @@ class CommandorPage {
|
||||
|
||||
async clickValid() {
|
||||
logWithDevice("clickValid() called.", this.device);
|
||||
for (let i = 0; i < 3; i++) {
|
||||
let _id_to_click = getRandomId()
|
||||
await this.page.click(_id_to_click)
|
||||
|
||||
await delay(getRandomWaitTime())
|
||||
}
|
||||
|
||||
this.isFillingFields = false
|
||||
try {
|
||||
if (!this.page.isClosed()) {
|
||||
@@ -898,20 +900,20 @@ class CommandorPage {
|
||||
break;
|
||||
case OCRResult.SLIDING_CAPTCHA:
|
||||
this.isAlreadyRefresh = true;
|
||||
await this.generateRandomActions()
|
||||
// logWithDevice("will call this.slidingCaptcha()", this.device)
|
||||
// await this.slidingCaptcha(async (isSuccessful) => {
|
||||
// logWithDevice("SLIDING_CAPTCHA result is " + isSuccessful, this.device)
|
||||
// console.log(checkResult);
|
||||
// if (isSuccessful) {
|
||||
// await delay(5 * 1000)
|
||||
// // checkResult = await this.ocrChecker.get_result();
|
||||
// await this.checkResultWithOcr()
|
||||
// } else {
|
||||
// await this.checkResultWithOcr()
|
||||
// }
|
||||
// })
|
||||
// await delay(5 * 1000)
|
||||
// await this.generateRandomActions()
|
||||
logWithDevice("will call this.slidingCaptcha()", this.device)
|
||||
await this.slidingCaptcha(async (isSuccessful) => {
|
||||
logWithDevice("SLIDING_CAPTCHA result is " + isSuccessful, this.device)
|
||||
console.log(checkResult);
|
||||
if (isSuccessful) {
|
||||
await delay(5 * 1000)
|
||||
// checkResult = await this.ocrChecker.get_result();
|
||||
await this.checkResultWithOcr()
|
||||
} else {
|
||||
await this.checkResultWithOcr()
|
||||
}
|
||||
})
|
||||
await delay(5 * 1000)
|
||||
break;
|
||||
case OCRResult.FILL_FIELD:
|
||||
logWithDevice("FILL_FIELD", this.device)
|
||||
@@ -974,8 +976,6 @@ class CommandorPage {
|
||||
}
|
||||
})
|
||||
await this.page.bringToFront();
|
||||
// this.page = pages;
|
||||
// this.page.await
|
||||
await this.fillFields(this.page)
|
||||
await delay(2 * 1000);
|
||||
}
|
||||
@@ -1351,12 +1351,6 @@ class CommandorPage {
|
||||
await exec(cmd);
|
||||
}
|
||||
|
||||
async inputForDevice(device, text) {
|
||||
let cmd = `adb -s ${device.serial} shell input text ${text}`
|
||||
logWithDevice("cmd is " + cmd, this.device)
|
||||
await exec(cmd);
|
||||
}
|
||||
|
||||
async clickOnConfirmBtn() {
|
||||
if (this.device.model === "CPH2219") {
|
||||
this.device.shell("input tap " + 900 + " " + 1532)
|
||||
|
||||
Reference in New Issue
Block a user