You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
On a newer version of Android first clickOn(Permissions.Button.DENY) works, but consequent automated permission deny will fail because under the hood deny button changes resource from permission_deny_button to permission_deny_and_dont_ask_again_button
Describe the solution you'd like
New enum value for "deny_and_dont_ask" button
enum class Button {
...
DENY,
DENY_AND_DONT_ASK,
}
Describe alternatives you've considered
As a workaround you can use UiDevice and find UiObject manually
fun Device.denyForeverViaDialog() {
wait(
timeoutMs = DIALOG_TIMEOUT_MS
) {
val uiObjectButton = getDenyForeverPermissionButtonAsUiObject(this.uiDevice)
if (uiObjectButton != null && uiObjectButton.exists()) {
uiObjectButton.click()
}
}
}
private fun getDenyForeverPermissionButtonAsUiObject(uiDevice: UiDevice): UiObject? {
return try {
val btnSelector = UiSelector()
.clickable(true)
.checkable(false)
.resourceId("com.android.permissioncontroller:id/permission_deny_and_dont_ask_again_button")
uiDevice.findObject(btnSelector)
} catch (e: UiObjectNotFoundException) {
null
} catch (e: Throwable) {
throw e
}
}
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
On a newer version of Android first
clickOn(Permissions.Button.DENY)
works, but consequent automated permission deny will fail because under the hood deny button changes resource frompermission_deny_button
topermission_deny_and_dont_ask_again_button
Describe the solution you'd like
New enum value for "deny_and_dont_ask" button
Describe alternatives you've considered
As a workaround you can use UiDevice and find UiObject manually
The text was updated successfully, but these errors were encountered: