Closed GoogleCodeExporter closed 9 years ago
The method only checks the text view it self if it is set to gone or
invincible. It will not check the layout it is in. It is designed like this and
at the moment it is not something that will be changed.
Original comment by renasr...@gmail.com
on 22 Jul 2011 at 12:03
I thought the idea of Robotium is that some independent tester can use the
provided methods of Robotium in a BlackboxTest. This means that the tester only
knows what is actually displayed, not wondering which element has its
visibility property set to VISIBLE. Since the Layout the TextView is in can
hide the TextView by setting its own property to INVISIBLE or GONE, I think
Robotium should check this Layout as well.
This is actually done quite easily as I just found out. Android provides the
method someView.isShown(). It checks if the view and also all ancestors of the
view is set to VISIBILE.
My suggestion would be that in the class
RobotiumUtils
the method
public static <T extends View> ArrayList<T> removeInvisibleViews(ArrayList<T>
viewList)
should be changed to the following:
ArrayList<T> tmpViewList = new ArrayList<T>(viewList.size());
for (T view : viewList) {
if (view != null && view.isShown()) {
tmpViewList.add(view);
}
}
return tmpViewList;
Works for me so far :)
Original comment by JoaRe...@gmail.com
on 22 Jul 2011 at 4:04
Sounds good. Will be changed. Thanks.
Original comment by renasr...@gmail.com
on 24 Jul 2011 at 4:07
Original issue reported on code.google.com by
JoaRe...@gmail.com
on 22 Jul 2011 at 11:35Attachments: