Hi to all.
I am trying to get all elements text in hierarchy like RecyclerView/LinearLayout/TextView in Android
List elements = driver.findElements(By.xpath(xpath));
The problem is, I can only get the on screen elements. For example, if 11 elements is displayed on screen, my lists size is 11. However If i’m scroll down, more elements are there.
Any suggestions to get all elements ?
It’s not possible, but I see one possibility also because UiScrollable objects having some methods using that you can retrieve all elements. But not sure about how you can pass to driver.findElements().
Hi Mates, are there any solution to achieve this?
@cgtyhan
Cheers,
Dev
try the following example but i’m not sure;
MobileElement parent = driver.findElement(By.id(“id/recyclerview”));
List childList = parent.findElements(By.className(“android.widget.RelativeLayout”));