Guest User

Untitled

a guest
May 23rd, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. WebElement seekBar = getDriver().findElement(By.xpath(<elementXpath>));
  2. int startX = seekBar.getLocation().getX();
  3. int endX = seekBar.getSize().getWidth();
  4. int yAxis = seekBar.getLocation().getY();
  5. int end50X = (int) (startX + ((seekBar.getSize().getWidth()) * 0.51));
  6. TouchAction action = new TouchAction(getDriver());
  7. action.press(startX, yAxis).moveTo(end50X, yAxis).release().perform();
Add Comment
Please, Sign In to add comment