I would rather move the slider using the following code in this situation -
Actions builder = new Actions(driver); Action dragAndDrop = builder.clickAndHold(someElement).moveByOffset(xOffset,yOffset).release().build(); dragAndDrop.perform();
It makes sense to move the slider by offset instead of using moveToElement (otherElement) in this particular case.
Hope this helps you.
Hari reddy
source share