I have automated seekbar in Android using TouchAction. seekbar can be seen moving but required value change is not happening, it seems to keep coming back to original position. How can I resolve this. Platform: Android.
Snippet:
TouchAction touchact= new TouchAction(driver);
touchact.longPress(x,y).WaitAction().moveTo(x,y).release.perform();
Thanks in Advance!!
Try w3c actions where you can control move speed.
Thanks @Aleksei for the suggestion, will try to implement w3 Actions, meanwhile can you please help with any code snippet for the same if possible.
something like:
PointerInput finger = new PointerInput(PointerInput.Kind.TOUCH, "finger");
Sequence dragNDrop = new Sequence(finger, 1);
dragNDrop.addAction(finger
.createPointerMove(Duration.ofMillis(0), PointerInput.Origin.viewport(), x1, y1));
dragNDrop.addAction(finger.createPointerDown(PointerInput.MouseButton.LEFT.asArg()));
dragNDrop.addAction(finger
.createPointerMove(Duration.ofMillis(1000), PointerInput.Origin.viewport(), x1, y1)); // long press for 1 sec
dragNDrop.addAction(finger
.createPointerMove(Duration.ofMillis(500), PointerInput.Origin.viewport(), x2, y2)); // move in 500 mSec
dragNDrop.addAction(finger.createPointerUp(PointerInput.MouseButton.LEFT.asArg()));
driver.perform(Arrays.asList(dragNDrop));