Hi..All
Iam not able to keep swiping in the spinner list in order to select the element which located at last in the list..iam using swipeUP method which swipe with first specified element as seen in the below code..
public boolean swipeUP() throws InterruptedException
{
MobileElement elm = (MobileElement)driver.findElement(By.xpath("//android.widget.CheckedTextView[contains(@resource-id,'android:id/text1') and @index = '8']"));
elm.swipe(SwipeElementDirection.UP, 6000);
Thread.sleep(1000);
MobileElement elm1 = (MobileElement)driver.findElement(By.xpath("//android.widget.CheckedTextView[contains(@resource-id,'android:id/text1') and @index = '9']"));
elm1.swipe(SwipeElementDirection.UP,7000);
Thread.sleep(1000);
MobileElement elm2 = (MobileElement)driver.findElement(By.xpath("//android.widget.CheckedTextView[contains(@resource-id,'android:id/text1') and @index = '8']"));
elm2.swipe(SwipeElementDirection.UP,8000);
MobileElement elm3 = (MobileElement)driver.findElement(By.xpath("//android.widget.CheckedTextView[contains(@resource-id,'android:id/text1') and @index = '7']"));
elm3.swipe(SwipeElementDirection.UP,10000);
return true;
}
but its not swiping from second element defined with in same method above.. not sure how i wrong here if it is.. would be great if you suggest a solution to fix the same..
Thank you