support for oneplus N20
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
const PublishType = require("./PublishType");
|
||||
const {hostname} = require("os");
|
||||
const hostName = hostname();
|
||||
|
||||
class ReserveResultPojo {
|
||||
|
||||
@@ -13,6 +15,7 @@ class ReserveResultPojo {
|
||||
this.email = mail;
|
||||
this.type = type;
|
||||
this.source_from = ""
|
||||
this.hostName = hostName
|
||||
this.created_at = new Date().toLocaleString()
|
||||
}
|
||||
|
||||
@@ -27,7 +30,8 @@ class ReserveResultPojo {
|
||||
url: this.url,
|
||||
store_type: this.storeType,
|
||||
source_from: this.source_from,
|
||||
created_at: this.created_at
|
||||
created_at: this.created_at,
|
||||
hostName: this.hostName
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user