How to handle 1st point of Seekbar in Android application using Appium

48 Views Asked by At

I'm automating an application form which has SeekBar for Age field and it has two points starting age and ending age. I already handle ending age point but I couldn't able to starting age point given in the attached below screenshot.

This is the below code that have implemented and that focus only on ending age point. I

xpath: //android.widget.SeekBar[@content-desc='15%']

Code:

Actions actions = new Actions(driver);
        int start = DistanceRangeSeekBaar.getLocation().getX();
        int end = DistanceRangeSeekBaar.getLocation().getY();       
        int moveTo = (int) (end * 0.4);
        actions.clickAndHold(DistanceRangeSeekBaar).moveToElement(DistanceRangeSeekBaar, start, moveTo).release().perform();

enter image description here

0

There are 0 best solutions below