public void SwipeDownToUpOnElementWithoutClosing(AndroidDriver androiddriver,MobileElement element)
{
//Down To Up
int intMiddleX = (int)(element.getRect().getX() + element.getSize().width/2);
int intUpperY = (int)(element.getRect().getY() + element.getSize().height * .9);
int intLowY = (int)(element.getRect().getY() + element.getSize().height * .1);
new TouchAction(androiddriver)
.press(PointOption.point(intMiddleX,intUpperY))
.waitAction(WaitOptions.waitOptions(Duration.ofMillis(1000)))
.moveTo(PointOption.point(intMiddleX,intLowY))
.release().perform();
}
public void SwipeUpToDownOnElement(AndroidDriver androiddriver,MobileElement element)
{
//Up To Down
int intMiddleX = (int)(element.getRect().getX() + element.getSize().width/2);
int intUpperY = (int)(element.getRect().getY() + element.getSize().height * .9);
int intLowY = (int)(element.getRect().getY() + element.getSize().height * .1);
new TouchAction(androiddriver)
.press(PointOption.point(intMiddleX,intLowY))
.waitAction(WaitOptions.waitOptions(Duration.ofMillis(1000)))
.moveTo(PointOption.point(intMiddleX,intUpperY))
.release().perform();
}