Skip to content

Instantly share code, notes, and snippets.

@Egorand
Created July 17, 2016 11:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Egorand/5ddfd9a787eb098021337f5628fd3569 to your computer and use it in GitHub Desktop.
Save Egorand/5ddfd9a787eb098021337f5628fd3569 to your computer and use it in GitHub Desktop.
android-testing-runtime-permissions-deny-current-permission-permanently
public static void denyCurrentPermissionPermanently(UiDevice device) throws UiObjectNotFoundException {
UiObject neverAskAgainCheckbox = device.findObject(new UiSelector().text(TEXT_NEVER_ASK_AGAIN));
neverAskAgainCheckbox.click();
denyCurrentPermission(device);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment