support for oneplus N20

This commit is contained in:
2023-12-08 11:38:19 +01:00
parent 0c18ae491c
commit 95c62a614c
2 changed files with 27 additions and 21 deletions
+22 -20
View File
@@ -168,12 +168,8 @@ class CommandorPage {
await this.enableDisableAirPlanMode();
// await delay(10 * 1000);
await openUrlWithAdb(RDV_URL, this.device)
await delay(15000)
await delay(10 * 1000)
await this.checkResultWithOcr()
// await this.clickOnlineAppointment();
// } else {
// this.isTerminated = true;
// }
let cancel
const intervalTask = setInterval(async () => {
@@ -953,6 +949,8 @@ class CommandorPage {
await this.tapForDevice(this.device, 530, 1064)
} else if (this.device.model() === "moto g51 5G") {
await this.tapForDevice(this.device, 500, 1080)
} else if (this.device.model() === "CPH2469") {
await this.tapForDevice(this.device, 360, 820)
} else if (this.device.model() === "M2006C3LG" || this.device.model() === "220233L2G") {
await this.tapForDevice(this.device, 350, 777)
} else if (this.device.model() === "KB2003" || this.device.model() === "DE2117") {
@@ -984,6 +982,8 @@ class CommandorPage {
await this.tapForDevice(this.device, 540, 1611)
} else if (this.device.model() === "22041219PG") {
await this.tapForDevice(this.device, 530, 1600)
} else if (this.device.model() === "CPH2469") {
await this.tapForDevice(this.device, 322, 1146)
} else
await this.tapForDevice(this.device, 500, 1680)
// await this.device.shell("input tap " + 500 + " " + 1680)
@@ -1096,6 +1096,8 @@ class CommandorPage {
await this.tapForDevice(this.device, 360, 777)
} else if (model === "ONEPLUS A6000") {
await this.tapForDevice(this.device, 530, 1045)
} else if (model === "CPH2469") {
await this.tapForDevice(this.device, 360, 820)
} else {
logWithDevice("handleBraveSkipBtn", this.device)
await this.tapForDevice(this.device, 470, 1160)
@@ -1184,21 +1186,21 @@ class CommandorPage {
async enableDisableAirPlanMode() {
logWithDevice("will enable/disable airplane mode", this.device)
// try {
// // await this.device.shell("cmd connectivity airplane-mode enable")
// await exceutShellCmd(this.device, "cmd connectivity airplane-mode enable")
// await delay(1000)
// await exceutShellCmd(this.device, "cmd connectivity airplane-mode disable")
// // await this.device.shell("cmd connectivity airplane-mode disable")
// await delay(2000)
// } catch (e) {
// try {
// await this.device.shell("cmd connectivity airplane-mode disable")
// } catch (e) {
// console.log(e)
// }
// console.log(e)
// }
try {
// await this.device.shell("cmd connectivity airplane-mode enable")
await exceutShellCmd(this.device, "cmd connectivity airplane-mode enable")
await delay(1000)
await exceutShellCmd(this.device, "cmd connectivity airplane-mode disable")
// await this.device.shell("cmd connectivity airplane-mode disable")
await delay(2000)
} catch (e) {
try {
await this.device.shell("cmd connectivity airplane-mode disable")
} catch (e) {
console.log(e)
}
console.log(e)
}
}
async tapGoogleDisconnectBtn() {