The problem
Alternative to swipe in element for Android
Environment
Appium version (or git revision) that exhibits the issue: v1.8.0-beta3
Desktop OS/version used to run Appium: mac
Node.js version (unless using Appium.app|exe):v8.5.0
Mobile platform/version under test: Android
Real device or emulator/simulator: Real device, 7.1
Details
I’m trying to do a swipe in element (not normal swipe) on android. And it seems that i cannot…
I have a list of tariffs and i want to swipe to delete one of them.
I also tried to do something as on iOS, but nothing happens:
/**
* Mobile Swipe in Element using JS
*
* @param direction direction: Either 'up', 'down', 'left' or 'right'
*/
public static void mobileSwipeInElement(RemoteWebElement element, String direction) {
JavascriptExecutor js = Drivers.getMobileDriver();
Map<String, Object> params = new HashMap<>();
params.put("element", element.getId());
params.put("direction", direction);
js.executeScript("mobile: swipe", params);
}
Any suggestions?