Scroll Action in appium

I have android and iOS application in which product detail page i want to get the product description but before that i have to scroll/swipe. i tried multiple time with different method.

((JavascriptExecutor) driver).executeScript(“mobile: swipeGesture”, ImmutableMap.of(
“left”, 389, “top”, 1224, “width”, 833, “height”, 759,
//“elementId” , ((RemoteWebElement) element1).getId(),
“direction”, “up”,
“percent”, 1,
“speed” ,10000
));

this is not working. please let me know how can i scroll/swipe to the element. as i used element id but it’s not getting locate.

1 Like