daily pastebin goal
86%
SHARE
TWEET

Untitled

a guest May 23rd, 2018 46 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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();
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top