Finding all elements in list view in appium
//Try this below the codeString a = "Last element name"; /// last element in the listBoolean found_result = false;while (!found_result){ List<WebElement> ele = driver.findElements(By.id("id of your element")); int size=0; size = size+ele.size(); for (int i = 0; i < size; i++) { String s = ele.get(i).getText(); if (s.equals(a)) { found =true; system.out.println(size); break; } } if(!found){ //find startx,starty, and Endy driver.swipe(startx, starty, endx, endy, duration); }}