add resetBrowser method
This commit is contained in:
@@ -339,6 +339,10 @@ class CommandorPage {
|
||||
})
|
||||
} else {
|
||||
log("audioBtn not found")
|
||||
console.log("audioBtn not found")
|
||||
console.log("we are blocked")
|
||||
//
|
||||
await this.resetBrowser()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -408,6 +412,17 @@ class CommandorPage {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
async resetBrowser() {
|
||||
console.log("will reset browser")
|
||||
await this.device.shell("pm clear com.android.chrome")
|
||||
await delay(1000)
|
||||
await this.device.shell("am set-debug-app --persistent com.android.chrome")
|
||||
await delay(1000)
|
||||
await this.device.shell("pm am start -n com.android.chrome/com.google.android.apps.chrome.Main")
|
||||
await delay(1000)
|
||||
this.isTerminated = true
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = CommandorPage
|
||||
Reference in New Issue
Block a user