How to double tap on a element using appium , this is for android app.
I tried several ways but its tapping once.
I got the solution and it is working now.
public static boolean performDoubleTapAction() {
int x, y;
try {
x = element.getLocation().getX();
y = element.getLocation().getY();
((AppiumDriver) driver).tap(1, x, y, 100);
try {
Thread.sleep(50);
} catch (Exception e1) {
}
((AppiumDriver) driver).tap(1, x, y, 100);
try {
Thread.sleep(100);
} catch (Exception e1) {
}
return true;
} catch (Exception e) {
return false;
}
}