I have the following Structure:
+------------>LinearLayout{id=2131689635, res-name=ll_monthly_advance_payments_container,
|
+------------->LinearLayout{id=2131689636, res-name=ll_monthly_advance_payments_list_container,
|
+-------------->LeftRightListItemView{id=-1,
|
+--------------->RelativeLayout{id=-1,
|
+---------------->ScrollableTextView{id=2131689786, res-name=stv_left, text=Electricity
|
+---------------->AppCompatTextView{id=2131689787, res-name=tv_right, text=53.00 EUR
|
+-------------->LeftRightListItemView{id=-1,
|
+--------------->RelativeLayout{id=-1,
|
+---------------->ScrollableTextView{id=2131689786, res-name=stv_left, text=Water
|
+---------------->AppCompatTextView{id=2131689787, res-name=tv_right, text=251.00 EUR
|
+-------------->LeftRightListItemView{id=-1,
|
+--------------->RelativeLayout{id=-1,
|
+---------------->ScrollableTextView{id=2131689786, res-name=stv_left, text=Totals
|
+---------------->AppCompatTextView{id=2131689787, res-name=tv_right, text=304.00 EUR
What I am trying to do is test whether as a pair, stv_left
and tv_right
contains the correct values. I can confirm each one individually with the following script:
onView(allOf(withId(R.id.tv_right), withText("53.00 EUR"), isDescendantOfA(withId(R.id.ll_monthly_advance_payments_list_container))));
I cannot confirm them as a pair. How I can solve this problem?