I'm working on automated testing using Appium and Robot Framework. I have an issue dealing with an item in Recyclerview. The recyclerview's item is a custom view which is a combination of mutiple textviews. Let's assume that the recyclerview's item looks like this
======================
TextViewA | TextViewB | TextViewC |
======================
Where
- TextViewA's id is "tvA"
- TextViewB's id is "tvB"
- TextViewC's id is "tvC"
My goal is to write a robot to iterative through the items and click the Textview (any of three) if the item matched the following conditions:
- @text in TextviewA must be equal ${paramA}
- @text in TextviewB must be equal ${paramB}
- @text in TextviewC must be equal ${paramC}
I decided to do the following:
- Get all items in recyclerview as a list and loop through the items. How? - Impossible because the list is a RecyclerView
- If 1. is impossible, create a while loop (for loop where ${i} = 0 - 9999) and check that is item[${i}] exists. If the item exists, check whether the @text in TextViews matched the parameters. If the item does not exists, scroll up and check the item again