use macocr
This commit is contained in:
@@ -874,7 +874,6 @@ class CommandorPage {
|
||||
if (isSuccessful) {
|
||||
checkResult = await this.ocrChecker.get_result();
|
||||
} else {
|
||||
// await this.checkResultWithOcr()
|
||||
checkResult = OCRResult.TERMINAED
|
||||
this.isTerminated = true
|
||||
}
|
||||
@@ -1034,6 +1033,13 @@ class CommandorPage {
|
||||
await delay(2000);
|
||||
await this.checkResultWithOcr();
|
||||
break;
|
||||
case OCRResult.CHOOSE_POSITION:
|
||||
logWithDevice("CHOOSE_POSITION", this.device)
|
||||
await this.tapForDevice(this.device, 300, 1300)
|
||||
await delay(2000);
|
||||
await this.tapForDevice(this.device, 300, 1700)
|
||||
await this.checkResultWithOcr();
|
||||
break;
|
||||
case OCRResult.TO_SKIP
|
||||
:
|
||||
logWithDevice("TO_SKIP", this.device)
|
||||
@@ -1124,11 +1130,9 @@ class CommandorPage {
|
||||
} else {
|
||||
logWithDevice("handleBraveSkipBtn", this.device)
|
||||
await this.tapForDevice(this.device, 470, 1160)
|
||||
// await this.device.shell("input tap " + 470 + " " + 1160)
|
||||
}
|
||||
await delay(2000);
|
||||
await this.tapForDevice(this.device, 455, 1920)
|
||||
// await this.device.shell("input tap " + 455 + " " + 1920)
|
||||
await delay(1000);
|
||||
}
|
||||
|
||||
@@ -1152,22 +1156,6 @@ class CommandorPage {
|
||||
|
||||
async closePage() {
|
||||
await this.resetBrowser();
|
||||
// while (!this.browser.isConnected()) {
|
||||
// logWithDevice("trying to connect to browser", this.device)
|
||||
// this.browser = await puppeteer.connect({
|
||||
// browserWSEndpoint: "ws://127.0.0.1:" + this.port + "/devtools/browser",
|
||||
// headless: false, defaultViewport: null
|
||||
// })
|
||||
// await delay(2 * 1000);
|
||||
// }
|
||||
// console.log("will close all pages");
|
||||
// let pages = await this.browser.pages();
|
||||
// await pages[0].close()
|
||||
// console.log("page closed");
|
||||
// pages.forEach((currentPage) => {
|
||||
// currentPage.close();
|
||||
// })
|
||||
// await this.browser.close();
|
||||
}
|
||||
|
||||
async skipOptimizationPage() {
|
||||
|
||||
Reference in New Issue
Block a user