if (this.getBrowserType() == BrowserType.IPAD) {
yOffsetByDevice = yOffset * 2;
}
if (driver instanceof HasTouchScreen) {
Action flick = (new TouchActions(driver)).flick(element, xOffset, yOffsetByDevice, speed).build();
flick.perform();
} else {
Action flick = (new Actions(driver)).dragAndDropBy(element, xOffset, yOffsetByDevice).build();
flick.perform();
}