use brave as browser

This commit is contained in:
2023-07-18 13:44:07 +02:00
parent ba7018aa57
commit b175fad215
+12 -3
View File
@@ -169,9 +169,12 @@ class CommandorPage {
await delay(3 * 1000); await delay(3 * 1000);
} }
} catch (e) { } catch (e) {
await this.checkResultWithOcr() logWithDevice("failed to connect to device", this.device)
console.log(e) console.log(e)
// this.isTerminated = true // await this.resetBrowser()
await this.checkResultWithOcr()
this.isTerminated = true
} }
if (this.page !== undefined) { if (this.page !== undefined) {
try { try {
@@ -900,7 +903,13 @@ class CommandorPage {
await this.checkResultWithOcr(); await this.checkResultWithOcr();
break; break;
case OCRResult.BRAVE_NOTIFICATION: case OCRResult.BRAVE_NOTIFICATION:
await this.device.shell("input tap " + 500 + " " + 1680) logWithDevice("BRAVE_NOTIFICATION", this.device)
if (this.device.model() === "21091116C")
await this.device.shell("input tap " + 540 + " " + 1611)
else if (this.device.model() === "22041219PG")
await this.device.shell("input tap " + 530 + " " + 1600)
else
await this.device.shell("input tap " + 500 + " " + 1680)
await delay(2000); await delay(2000);
await this.checkResultWithOcr(); await this.checkResultWithOcr();
break; break;