From 48ff39411701a7465727b695cede44dfa8a5b90d Mon Sep 17 00:00:00 2001 From: Lei PAN Date: Mon, 17 Jul 2023 23:36:49 +0200 Subject: [PATCH] use brave as browser --- src/workers/CommandorPage.js | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/workers/CommandorPage.js b/src/workers/CommandorPage.js index 8b65bda..46f5daa 100644 --- a/src/workers/CommandorPage.js +++ b/src/workers/CommandorPage.js @@ -68,8 +68,8 @@ class CommandorPage { this.choosedStore = selectedStore; this.port = port; this.ocrChecker = new OCRChecker(this.device, this.contact); - // this.browserPackageName = "com.brave.browser"; - this.browserPackageName = "com.android.chrome"; + this.browserPackageName = "com.brave.browser"; + // this.browserPackageName = "com.android.chrome"; this.isFillingFields = false; this.isTerminated = false; this.cguChecked = false; @@ -135,7 +135,7 @@ class CommandorPage { async loadPage() { logWithDevice(this.device.serial() + ":loadPage() called, with port:" + this.port, this.device); try { - await this.device.shell("am start -n com.android.chrome/com.google.android.apps.chrome.Main") + await this.device.shell("am start -n " + this.browserPackageName + "/com.google.android.apps.chrome.Main") await delay(5 * 1000); } catch (e) { console.log(e) @@ -744,12 +744,6 @@ class CommandorPage { } } - async removeDebugFlag() { - await delay(1000) - await this.device.shell("am clear-debug-app --persistent com.android.chrome") - await delay(1000) - } - async resetBrowser() { logWithDevice("resetBrowser", this.device); this.isFillingFields = false; @@ -762,8 +756,6 @@ class CommandorPage { // this.disconnectBrowser(); await this.device.shell("pm clear " + this.browserPackageName) await delay(1000) - // await this.device.shell("am start -n " + this.browserPackageName + "/com.google.android.apps.chrome.Main") - // await delay(2000); this.isTerminated = true; // await this.checkResultWithOcr(); }