From 80f363fd106e4663c5e1880b3e583629f1063a5c Mon Sep 17 00:00:00 2001 From: Lei PAN Date: Sat, 28 Oct 2023 15:46:19 +0200 Subject: [PATCH] adapte the new block page --- src/workers/CommandorPage.js | 4 ++-- src/workers/OCRChecker.js | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/workers/CommandorPage.js b/src/workers/CommandorPage.js index f4366f4..3bac37e 100644 --- a/src/workers/CommandorPage.js +++ b/src/workers/CommandorPage.js @@ -729,8 +729,8 @@ class CommandorPage { async slidingCaptcha(onResult) { logWithDevice("slidingCaptcha", this.device); - if (this.device.model() === "MI 5s") { - let cmd = `adb -s ${this.device.serial()} shell input touchscreen swipe 900 495 900 295` + if (this.device.model() === "MI 5s" || this.device.model() === "ASUS_X00QD") { + let cmd = `adb -s ${this.device.serial()} shell input touchscreen swipe 900 495 900 195` await exec(cmd); await delay(1000); } diff --git a/src/workers/OCRChecker.js b/src/workers/OCRChecker.js index 96fe260..95f60da 100644 --- a/src/workers/OCRChecker.js +++ b/src/workers/OCRChecker.js @@ -37,6 +37,7 @@ const SLIDING_CAPTCHA_FR = "Pourquoi cette vérification" const SLIDING_CAPTCHA_FR_2 = "Glissez vers la droite pour" const SLIDING_CAPTCHA_FR_3 = "la droite pour completer le puzzle" const SLIDING_CAPTCHA_FR_4 = " s'assure qu'on s'adresse bien" +const SLIDING_CAPTCHA_FR_5 = "On s'assure que c'est" const MESSAGE_FILL_FIELD_FR = "Demande de rendez-vous pour" const MESSAGE_FILL_FIELD_FR_2 = "des champs de données doivent étre complétés" const MESSAGE_FILL_FIELD_FR_3 = "Sans préféré" @@ -128,7 +129,7 @@ class OCRChecker { await this.deleteFile(fileName) await this.deleteFile(screenShot) return OCRResult.RECHECK - } else if (result.includes(SLIDING_CAPTCHA_FR) || result.includes(SLIDING_CAPTCHA_FR_2) || result.includes(SLIDING_CAPTCHA_FR_3) || result.includes(SLIDING_CAPTCHA_FR_4)) { + } else if (result.includes(SLIDING_CAPTCHA_FR) || result.includes(SLIDING_CAPTCHA_FR_2) || result.includes(SLIDING_CAPTCHA_FR_3) || result.includes(SLIDING_CAPTCHA_FR_4) || result.includes(SLIDING_CAPTCHA_FR_5)) { await this.deleteFile(fileName) await this.deleteFile(screenShot) // if (result.includes("rac"))