generated more action before validating rdv

This commit is contained in:
2024-12-20 18:19:58 +01:00
parent 56347a83f1
commit 1d5d6534cb
+17 -23
View File
@@ -588,10 +588,12 @@ class CommandorPage {
async clickValid() { async clickValid() {
logWithDevice("clickValid() called.", this.device); logWithDevice("clickValid() called.", this.device);
for (let i = 0; i < 3; i++) {
let _id_to_click = getRandomId() let _id_to_click = getRandomId()
await this.page.click(_id_to_click) await this.page.click(_id_to_click)
await delay(getRandomWaitTime()) await delay(getRandomWaitTime())
}
this.isFillingFields = false this.isFillingFields = false
try { try {
if (!this.page.isClosed()) { if (!this.page.isClosed()) {
@@ -898,20 +900,20 @@ class CommandorPage {
break; break;
case OCRResult.SLIDING_CAPTCHA: case OCRResult.SLIDING_CAPTCHA:
this.isAlreadyRefresh = true; this.isAlreadyRefresh = true;
await this.generateRandomActions() // await this.generateRandomActions()
// logWithDevice("will call this.slidingCaptcha()", this.device) logWithDevice("will call this.slidingCaptcha()", this.device)
// await this.slidingCaptcha(async (isSuccessful) => { await this.slidingCaptcha(async (isSuccessful) => {
// logWithDevice("SLIDING_CAPTCHA result is " + isSuccessful, this.device) logWithDevice("SLIDING_CAPTCHA result is " + isSuccessful, this.device)
// console.log(checkResult); console.log(checkResult);
// if (isSuccessful) { if (isSuccessful) {
// await delay(5 * 1000) await delay(5 * 1000)
// // checkResult = await this.ocrChecker.get_result(); // checkResult = await this.ocrChecker.get_result();
// await this.checkResultWithOcr() await this.checkResultWithOcr()
// } else { } else {
// await this.checkResultWithOcr() await this.checkResultWithOcr()
// } }
// }) })
// await delay(5 * 1000) await delay(5 * 1000)
break; break;
case OCRResult.FILL_FIELD: case OCRResult.FILL_FIELD:
logWithDevice("FILL_FIELD", this.device) logWithDevice("FILL_FIELD", this.device)
@@ -974,8 +976,6 @@ class CommandorPage {
} }
}) })
await this.page.bringToFront(); await this.page.bringToFront();
// this.page = pages;
// this.page.await
await this.fillFields(this.page) await this.fillFields(this.page)
await delay(2 * 1000); await delay(2 * 1000);
} }
@@ -1351,12 +1351,6 @@ class CommandorPage {
await exec(cmd); 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() { async clickOnConfirmBtn() {
if (this.device.model === "CPH2219") { if (this.device.model === "CPH2219") {
this.device.shell("input tap " + 900 + " " + 1532) this.device.shell("input tap " + 900 + " " + 1532)