support more devices

This commit is contained in:
2023-11-23 17:47:01 +01:00
parent f3f82b2125
commit 9be644aadf
+9 -2
View File
@@ -671,7 +671,7 @@ class CommandorPage {
async slidingCaptcha(onResult) { async slidingCaptcha(onResult) {
logWithDevice("slidingCaptcha", this.device); 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` let cmd = `adb -s ${this.device.serial()} shell input touchscreen swipe 900 495 900 195`
await exec(cmd); await exec(cmd);
await delay(5000); await delay(5000);
@@ -933,8 +933,11 @@ class CommandorPage {
await this.checkResultWithOcr(); await this.checkResultWithOcr();
break; break;
case OCRResult.BRAVE_PRIVACY: 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) 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") { } else if (this.device.model() === "ONEPLUS A6000") {
await this.tapForDevice(this.device, 530, 1064) await this.tapForDevice(this.device, 530, 1064)
} else if (this.device.model() === "moto g51 5G") { } else if (this.device.model() === "moto g51 5G") {
@@ -957,6 +960,8 @@ class CommandorPage {
case OCRResult.BRAVE_PRIVACY_PUB: case OCRResult.BRAVE_PRIVACY_PUB:
if (this.device.model() === "MI 5s" || this.device.model() === "ASUS_Z012D") { if (this.device.model() === "MI 5s" || this.device.model() === "ASUS_Z012D") {
await this.tapForDevice(this.device, 60, 1400) await this.tapForDevice(this.device, 60, 1400)
} else if (this.device.model() === "HUAWEI NXT-TL00") {
await this.tapForDevice(this.device, 530, 950)
} else } else
await this.tapForDevice(this.device, 455, 1920) await this.tapForDevice(this.device, 455, 1920)
await delay(2000); await delay(2000);
@@ -1074,6 +1079,8 @@ class CommandorPage {
await this.tapForDevice(this.device, 530, 1000) await this.tapForDevice(this.device, 530, 1000)
} else if (model === "SM-G965U1") { } else if (model === "SM-G965U1") {
await this.tapForDevice(this.device, 530, 1000) 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") { } else if (model === "M2006C3LG" || model === "220233L2G") {
await this.tapForDevice(this.device, 360, 777) await this.tapForDevice(this.device, 360, 777)
} else if (model === "ONEPLUS A6000") { } else if (model === "ONEPLUS A6000") {