diff --git a/clear_data.sh b/clear_data.sh index 485417d..86f813b 100644 --- a/clear_data.sh +++ b/clear_data.sh @@ -40,3 +40,27 @@ adb -s d54e946 shell am start -n com.android.chrome/com.google.android.apps.chro adb -s 926f2061 shell pm clear com.android.chrome adb -s 926f2061 shell am set-debug-app --persistent com.android.chrome adb -s 926f2061 shell am start -n com.android.chrome/com.google.android.apps.chrome.Main +#samsung J5 - 2016 +adb -s 4f55c3d4 shell pm clear com.android.chrome +adb -s 4f55c3d4 shell am set-debug-app --persistent com.android.chrome +adb -s 4f55c3d4 shell am start -n com.android.chrome/com.google.android.apps.chrome.Main + +#samsung J5 - 2016 +adb -s 69db59f0 shell pm clear com.android.chrome +adb -s 69db59f0 shell am set-debug-app --persistent com.android.chrome +adb -s 69db59f0 shell am start -n com.android.chrome/com.google.android.apps.chrome.Main + +#samsung J5 - 2016 +adb -s 6c3076e6 shell pm clear com.android.chrome +adb -s 6c3076e6 shell am set-debug-app --persistent com.android.chrome +adb -s 6c3076e6 shell am start -n com.android.chrome/com.google.android.apps.chrome.Main + +#samsung J5 - 2016 +adb -s 774687ff shell pm clear com.android.chrome +adb -s 774687ff shell am set-debug-app --persistent com.android.chrome +adb -s 774687ff shell am start -n com.android.chrome/com.google.android.apps.chrome.Main + +#samsung J5 - 2016 +adb -s ffa9b2bc shell pm clear com.android.chrome +adb -s ffa9b2bc shell am set-debug-app --persistent com.android.chrome +adb -s ffa9b2bc shell am start -n com.android.chrome/com.google.android.apps.chrome.Main diff --git a/src/workers/CommandorPage.js b/src/workers/CommandorPage.js index 6add8c0..314da99 100644 --- a/src/workers/CommandorPage.js +++ b/src/workers/CommandorPage.js @@ -229,7 +229,9 @@ class CommandorPage { try { if (!this.page.isClosed()) { this.page.evaluate(() => { - document.getElementsByClassName("btn")[0].focus(); + let element = document.getElementsByClassName("btn")[0]; + if (typeof element !== 'undefined') + document.getElementsByClassName("btn")[0].focus(); }) await delay(getRandomWaitTime()) if (!this.page.isClosed()) {