calabash / calabash-android-server

Automated Functional testing for Android based on cucumber
Other
28 stars 41 forks source link

Use getCurrentFocus if mServedView is unavailable. #104

Closed marsinchevskaya closed 3 years ago

marsinchevskaya commented 3 years ago

A workaround for devices where hidden apis are unavailable (by default they are unavailable on devices with Android 9+) They work for devices on which the command _adb shell settings put global hidden_apipolicy 1 is executed and don't work otherwise. This workaround fixes this restriction and if hidden apis are unavailable we use getCurrentFocus() instead of mServedView.

Tested locally on Google Pixel 4a with _hidden_apipolicy unset.