setJS(js);
}
private void nativeFlickFromElement(WebDriverLikeRequest request, Dimension screenSize, Point offset, double speed,
String elementId) throws Exception {
RemoteWebNativeBackedElement element = (RemoteWebNativeBackedElement) getWebDriver().createElement(elementId);
Point fromPoint = element.getLocation(RemoteWebElement.ElementPosition.CENTER);
Point toPoint = new Point(fromPoint.getX() + offset.getX(), fromPoint.getY() + offset.getY());
fromPoint = CoordinateUtils.forcePointOnScreen(fromPoint, screenSize);
toPoint = CoordinateUtils.forcePointOnScreen(toPoint, screenSize);
int dx = toPoint.getX() - fromPoint.getX();
int dy = toPoint.getY() - fromPoint.getY();