adapte oneplus 6
This commit is contained in:
@@ -762,6 +762,21 @@ class CommandorPage {
|
||||
console.log(e)
|
||||
this.isTerminated = true
|
||||
}
|
||||
} else {
|
||||
logWithDevice("this.browser.isConnected() is " + this.browser.isConnected(), this.device)
|
||||
if (this.browser.isConnected()) {
|
||||
let pages = await this.browser.pages();
|
||||
pages.forEach((currentPage) => {
|
||||
if (currentPage.url() === RDV_URL) {
|
||||
this.page = currentPage;
|
||||
}
|
||||
})
|
||||
await this.page.bringToFront();
|
||||
// this.page = pages;
|
||||
// this.page.await
|
||||
await this.fillFields(this.page)
|
||||
await delay(2 * 1000);
|
||||
}
|
||||
}
|
||||
// if (!this.browser.isConnected()) {
|
||||
// this.isTerminated = true;
|
||||
@@ -884,13 +899,15 @@ class CommandorPage {
|
||||
this.device.shell("input tap " + 490 + " " + 1910)
|
||||
} else if (model === "Mi Note 10") {
|
||||
this.device.shell("input tap " + 550 + " " + 1920)
|
||||
} else if (model === "ONEPLUS A6000") {
|
||||
this.device.shell("input tap " + 535 + " " + 1945)
|
||||
} else
|
||||
this.device.shell("input tap " + 385 + " " + 2050)
|
||||
await delay(2000);
|
||||
}
|
||||
|
||||
async enableDisableAirPlanMode() {
|
||||
logWithDevice("will enable aireplan mode", this.device)
|
||||
logWithDevice("will enable airplane mode", this.device)
|
||||
await this.device.shell("cmd connectivity airplane-mode enable")
|
||||
await this.device.shell("adb shell settings put global airplane_mode_on 1")
|
||||
await delay(1000)
|
||||
|
||||
Reference in New Issue
Block a user