I am struggling with a navigation drawer on a native Android app.
So there are 11 elements in the drawer, 9 are visible, for the rest you have to scroll down.
those elements contain 2 child elements, first - imageView, second - textView element.
what I want to do, is create a method to iterate through the visible drawer elements in search for the element with a specific name and then tap on it, if the elements is invisible, I will scroll the drawer down/up and then repeat the iteration.
So I need a for loop to iterate through textView elements, locate the one I need using a text attribute and then click on the parent element of this textView.
However I'm struggling with properly locating the elements using xpath and Appium can not seem to find them.
Can anyone help me to understand how to specify xpath dynamically so I can iterate through the elements?
Thank you.