Using Espresso, I would like to be able to click on a specific child of the ExpandableListView (named CustomExpandableView). Listview creates a set of RelativeLayouts (named MyContainer).
Ideally, I would like to click on a specific MyContainer in a CustomExpandableView. But I can live by simply clicking on the first.
MyContainer objects do not have unique identifiers that I can reference, but their children, for example. - "text = Example text here 1"
I tried several different use cases for onData, passing in the class type and trying to get the child in a specific position, but it just doesn't work. And I wanted to avoid getting the object and repeating it until I found the right child.
Here is part of the view hierarchy for the link (I removed important information from the hierarchy):
+ -----> CustomExpandableView {}
|
+ ------> LinearLayout {}
|
+ -------> TextView {}
|
+ -------> FrameLayout {}
|
+ --------> BreadCrumbView {}
|
+ ---------> ImageButton {}
|
+ ---------> TextView {}
|
+ ------> LinearLayout {}
|
+ -------> MyContainer {}
|
+ --------> ImageView {res-name = thumb,}
|
+ --------> ImageView {res-name = divider}
|
+ --------> TextView {res-name = label, text = Sample Text Here 1, input-type = 0, ime-target = false}
|
+ -------> MyContainer {}
|
+ --------> ImageView {res-name = thumb}
|
+ --------> ImageView {res-name = divider}
|
+ --------> TextView {res-name = label text = Sample Text Here 2, input-type = 0, ime-target = false}
|
source share