From c302c31af5449bba1d2a08bff7cc5928053cec62 Mon Sep 17 00:00:00 2001 From: Lei PAN Date: Sat, 28 Oct 2023 17:15:25 +0200 Subject: [PATCH] adapte the new block page --- src/utiles/CmdUtils.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/utiles/CmdUtils.js b/src/utiles/CmdUtils.js index 3369689..a44e019 100644 --- a/src/utiles/CmdUtils.js +++ b/src/utiles/CmdUtils.js @@ -37,8 +37,12 @@ async function openUrlWithAdb(url, device) { // do not continue if device is blocked console.log("load url on device " + device.model() + " url=" + url) let cmd = "adb -s " + device.serial() + " shell am start -a android.intent.action.VIEW -d " + url - let output = await cmdExecute(cmd); - console.log(`stdout: ${output}`); + try { + let output = await cmdExecute(cmd); + console.log(`stdout: ${output}`); + } catch (e) { + console.log(e) + } } async function findText(imgPath) {