use adb to take screenshot
This commit is contained in:
@@ -83,6 +83,10 @@ class CommandorPage {
|
||||
|
||||
async connect_to_browser(ocrResult) {
|
||||
console.log("connect_to_browser() called");
|
||||
if (this.browser === undefined) {
|
||||
this.isTerminated = true
|
||||
return
|
||||
}
|
||||
console.log("browser.isConnected: " + this.browser.isConnected());
|
||||
if (!this.browser.isConnected()) {
|
||||
this.browser = await puppeteer.connect({
|
||||
@@ -980,9 +984,10 @@ class CommandorPage {
|
||||
await this.checkResultWithOcr();
|
||||
break;
|
||||
case OCRResult.BRAVE_PRIVACY:
|
||||
if (this.device.model() === "MI 5s")
|
||||
await this.device.shell("input tap " + 530 + " " + 970)
|
||||
else if (this.device.model() === "ONEPLUS A6000")
|
||||
if (this.device.model() === "MI 5s") {
|
||||
await this.tapForDevice(this.device, 530, 970)
|
||||
// await this.device.shell("input tap " + 530 + " " + 970)
|
||||
} else if (this.device.model() === "ONEPLUS A6000")
|
||||
await this.device.shell("input tap " + 530 + " " + 1064)
|
||||
else if (this.device.model() === "KB2003")
|
||||
await this.tapForDevice(this.device, 500, 1200)
|
||||
@@ -1124,6 +1129,8 @@ class CommandorPage {
|
||||
this.device.shell("input tap " + 900 + " " + 1532)
|
||||
} else if (this.device.model() === "MI 5s") {
|
||||
this.device.shell("input tap " + 925 + " " + 1325)
|
||||
} else if (this.device.model() === "22041219PG") {
|
||||
this.device.shell("input tap " + 925 + " " + 1430)
|
||||
} else
|
||||
this.device.shell("input tap " + 933 + " " + 1538)
|
||||
await delay(2000);
|
||||
|
||||
Reference in New Issue
Block a user