Here is the situation.
I got UI like this.
(1)LinearLayout
(0)LinearLayout --parent
(0)LinearLayout --son1
(0)LinearLayout
(0)LinearLayout
(0)TextView
(1)ImageView
(2)View
(3)EditText
(1)LinearLayout
...
(2)LinearLayout --son3
...
(3)LinearLayout
(4)LinearLayout
(5)LinearLayout
I have located the parent.And I want get the editText which is included in son1.
So I use this. List<EditText> list = solo.getCurrentViews(EditText.class,parent.getChildAt(0));
EditText et = list.get(0);
But it doesn't work. the size of List is 2. Why? I have no idea with that. After some try,
I found that one editText is included by son3,another editText is included by son1.
Does anyone encounter this situation? Please help me out