-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
e2e: close ANR popup in case if exception happened
- Loading branch information
1 parent
657531f
commit 1fa5412
Showing
2 changed files
with
16 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import execAsync from './execAsync'; | ||
import type {PromiseWithAbort} from './execAsync'; | ||
|
||
const closeANRPopup = function (platform = 'android'): PromiseWithAbort { | ||
if (platform !== 'android') { | ||
throw new Error(`closeANRPopup() missing implementation for platform: ${platform}`); | ||
} | ||
|
||
// Press "Enter" to close the ANR popup | ||
return execAsync(`adb shell input keyevent KEYCODE_ENTER`); | ||
}; | ||
|
||
export default closeANRPopup; |