Scrolling listview but till the middle of the list. unable to scroll till the last?

driver.findElement(By.id(“co.nworks.leaveapp:id/txt_select_project”)).click();

MobileElement listGroup =(MobileElement) driver.findElements
		(MobileBy.AndroidUIAutomator("new UiScrollable(new UiSelector()"
				+ ".className(\"android.widget.CheckedTextView\")).scrollIntoView("
+ "new UiSelector().text(\"Miscellaneous\"));"));
assertNotNull(listGroup.getLocation());
listGroup.click();

i want to select the last element .but it is throwing class casr exception cannot convert arraylist to mobile element

Instead of over complicating it, can you not simply add an additional scroll/swipe action, or increment the index you’re checking for by 1?

Thanks. its working now…!

Hi,

Can you please let me know the code for scroll.
i tried it but not working for me…