From 9be644aadf01c6a97d409e3cd471bb14185dd456 Mon Sep 17 00:00:00 2001 From: Lei PAN Date: Thu, 23 Nov 2023 17:47:01 +0100 Subject: [PATCH] support more devices --- src/workers/CommandorPage.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/workers/CommandorPage.js b/src/workers/CommandorPage.js index 2452a04..782b090 100644 --- a/src/workers/CommandorPage.js +++ b/src/workers/CommandorPage.js @@ -671,7 +671,7 @@ class CommandorPage { async slidingCaptcha(onResult) { logWithDevice("slidingCaptcha", this.device); - if (this.device.model() === "MI 5s" || this.device.model() === "ASUS_X00QD" || this.device.model() === "ASUS_Z012D") { + if (this.device.model() === "MI 5s" || this.device.model() === "ASUS_X00QD" || this.device.model() === "ASUS_Z012D" || this.device.model() === "HUAWEI NXT-TL00") { let cmd = `adb -s ${this.device.serial()} shell input touchscreen swipe 900 495 900 195` await exec(cmd); await delay(5000); @@ -933,8 +933,11 @@ class CommandorPage { await this.checkResultWithOcr(); break; case OCRResult.BRAVE_PRIVACY: - if (this.device.model() === "MI 5s" || this.device.model() === "SM-G965U1" || this.device.model() === "ASUS_Z012D") { + let model = this.device.model() + if (model === "MI 5s" || this.device.model() === "SM-G965U1" || this.device.model() === "ASUS_Z012D") { await this.tapForDevice(this.device, 530, 970) + } else if (model === "HUAWEI NXT-TL00") { + await this.tapForDevice(this.device, 530, 950) } else if (this.device.model() === "ONEPLUS A6000") { await this.tapForDevice(this.device, 530, 1064) } else if (this.device.model() === "moto g51 5G") { @@ -957,6 +960,8 @@ class CommandorPage { case OCRResult.BRAVE_PRIVACY_PUB: if (this.device.model() === "MI 5s" || this.device.model() === "ASUS_Z012D") { await this.tapForDevice(this.device, 60, 1400) + } else if (this.device.model() === "HUAWEI NXT-TL00") { + await this.tapForDevice(this.device, 530, 950) } else await this.tapForDevice(this.device, 455, 1920) await delay(2000); @@ -1074,6 +1079,8 @@ class CommandorPage { await this.tapForDevice(this.device, 530, 1000) } else if (model === "SM-G965U1") { await this.tapForDevice(this.device, 530, 1000) + } else if (model === "HUAWEI NXT-TL00") { + await this.tapForDevice(this.device, 530, 950) } else if (model === "M2006C3LG" || model === "220233L2G") { await this.tapForDevice(this.device, 360, 777) } else if (model === "ONEPLUS A6000") {