I'm using Appium and WebdriverIO to test Android device. But I couldn't use alertAccept()
because it is not implemented in Appium 1.7.1, to click on "OK" button on Alert Message.
How to close alert message ? May be there another ways to solve this problem.
Asked
Active
Viewed 366 times
0

piet.t
- 11,718
- 21
- 43
- 52

regression
- 1
- 2
-
1did you check this https://stackoverflow.com/questions/17612315/keyevent-to-click-on-alert-dialog-of-android-screen – pankaj mishra Dec 29 '17 at 06:15
1 Answers
0
Alert butts are inspectable on Android and they would have a locator similar to this:
- ID:
com.android.packageinstaller:id/permission_allow_button
- XPath:
//android.widget.Button[@resource-id='com.android.packageinstaller:id/permission_allow_button']
P.S. The above are for the accept/ok button. The reject/cancel button would have a locator with permission_deny_button
instead of permission_allow_button

Hassan Radi
- 936
- 10
- 22