Please help me to automate this feature. I am using corejava, appium and selenium to write code. Please help me with a code to automate the functionality.
Thanks Wreed for your reply. Yes i have tried couple of methods using Touch Actions, but did not work . Below is the code:
public void testSeekbar(){
//Get Start co-ordinate of seek bar
int start = seek_Bar.getLocation().getX();
System.out.println(start);
// Get Location of seekbar vertically
int y = seek_Bar.getLocation().getY();
System.out.println(y);
// Get Width of Seek Bar
int end = seek_Bar.getSize().getWidth();
System.out.println(end);
// Create object of Touch Actions class
TouchAction action = new TouchAction(driver);
// Move it till end
action.longPress(start, y).moveTo(end, y).release().perform();
//action.press(start, y).moveTo(end, y).release().perform();
Second one:
Dimension dim = seekbar16.getSize();
System.out.println(dim);
int height = dim.getHeight();
int width = dim.getWidth();
int x = width/2;
int top_y = (int)(height0.80);
int bottom_y = (int)(height0.20);
System.out.println(“coordinates :” + x + " "+ top_y + " "+ bottom_y);
driver.swipe(x, top_y, x, bottom_y, 5000);
TouchAction ts = new TouchAction(driver);
ts.press(x, top_y).moveTo(x, bottom_y).release().perform();
I don’t have element id as seekbar, so i am unable to find the element. I have given the html content for seek bar, can u please tell me how to find it with the above html?