Reputation: 541
I use the following sample code to tap, when testing mobile apps.
JavascriptExecutor js = (JavascriptExecutor) DeviceWrapper.getAppiumDriver();
HashMap tapObject = new HashMap();
tapObject.put("touchCount", (double) 1);
tapObject.put("duration", (double) 0.001);
tapObject.put("x", 160.0);
tapObject.put("y", 540.0);
js.executeScript("mobile: tap", tapObject);
This code works fine on devices running Android 4.x but fails on devices running on Android 5.x. Specifically, it fails when tapping on webview links. I can see in the Appium Inspector that it does tap on the webview link, and the link gets underlined but the tap doesn't lead to the next screen as expected.
Just wondering if anyone has any ideas. Thank You. I am on Version 1.3.5 of Appium on a Mac.
Upvotes: 2
Views: 907
Reputation: 510
Android 5.1 is not supported
Currently, Android 5.1 is not supported. Checking the Github issue tracker for appium shows the following result suggesting Android 5.1 will be supported in Appium 1.5.
Webview issues persist in Android 5.0.x
While Android 5.0.x versions are supported, there are issues regarding webviews posted in the issue tracker which have no resolve. It looks as if the bug has been assigned to be fixed but it is currently present in appium 1.3.4_1
What to do:
Currently, the appium webview issue is present in Android 5.0+ but will most likely be fixed soon with the new automation backend. If you need to push production code you will have to test without appium. Also, you may consult the github page for advice.
Upvotes: 2