作者:火鸟大叔 | 来源:互联网 | 2023-08-09 08:16
IhavethefollowingStructure:我有以下结构:+------------>LinearLayout{id2131689635,res-namell_mo
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:
我要做的是测试是否一对,stv_left和tv_right包含正确的值。我可以使用以下脚本单独确认每个:
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?
我无法确认它们是一对。我怎么能解决这个问题?
2 个解决方案