j'ai une application, ont ListView, je veux trouver LinearLayout, id = order_untake_jijia_listview_jiaEspresso onData Erreur d'effectuer 'des données de l'adaptateur de charge' sur la vue
code est:
onData(withClassName(endsWith("ListView")))
.inAdapterView(allOf(withId(R.id.order_untake_jijia_listview_ll), hasSibling(withText("9.0"))))
.atPosition(0).onChildView(withId(R.id.order_untake_jijia_listview_jia));
dataInteraction.perform(ViewActions.click());
Mais j'ai l'erreur:
Error performing 'load adapter data' on view '(with id: com.edaixi:id/order_untake_jijia_listview_ll and has sibling: with text: is "9.0")'.
Caused by: java.lang.RuntimeException: Action will not be performed because the target view does not match one or more of the following constraints:
(is assignable from class: class android.widget.AdapterView and is displayed on the screen to the user)
Target view: "LinearLayout{id=2131493753, res-name=order_untake_jijia_listview_ll, visibility=VISIBLE, width=170, height=50, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, root-is-layout-requested=false, has-input-connection=false, x=572.0, y=25.0, child-count=3}"
Je veux trouver "order_untake_jijia_listview_ll" enfant "order_untake_jijia_listview_jia" mais trouve son père .... –
s'il vous plaît reformater. –
Je pense que dans les nouvelles versions d'Espresso ce n'est plus un problème. – 476rick