WebElement link = driver.findElement(By.id("link1"));
int originalX = link.getLocation().x;
// The element is located at the right of the page,
// so it is not initially visible on the screen.
Action flick = getBuilder(driver).flick(-1000, 0).build();
flick.perform();
int newX = link.getLocation().x;
// After flicking, the element should now be visible on the screen.
assertTrue(newX < originalX, "Expected x < " + originalX + ", but got x = " + newX);
}