-
-
Save hitherejoe/a4ac9a2f92a22740f17a to your computer and use it in GitHub Desktop.
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
private void allowPermissionsIfNeeded() { | |
if (Build.VERSION.SDK_INT >= 23) { | |
UiObject allowPermissions = mDevice.findObject(new UiSelector().text("Allow")); | |
if (allowPermissions.exists()) { | |
try { | |
allowPermissions.click(); | |
} catch (UiObjectNotFoundException e) { | |
Timber.e(e, "There is no permissions dialog to interact with "); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment