sangmingming / robotium

Automatically exported from code.google.com/p/robotium
0 stars 0 forks source link

getText() no longer finding View.GONE TextViews #91

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I was previous using Robotium v1.9.0 and have a test project running ~100 tests 
against my Android app.

I noticed Robotium v2.2.0 was out, and tried upgrading to it.

It appears there's a change somewhere between v1.9 and v2.2 that getText() is 
no longer finding TextViews that are hidden (View.GONE).

I am using getText() to find TextViews that transition in and out of visibility 
during my testing, to ensure that they are being hidden then shown.  I can no 
longer do this.  I do not see another quick way of finding View.GONE views in 
the Activity.

Is this an expected change?

Additional feedback:  I could not find a change log (nor a breaking-change log) 
for recent releases.  Including that on the wiki would be very useful.

Original issue reported on code.google.com by nicjan...@gmail.com on 27 Mar 2011 at 4:10

GoogleCodeExporter commented 9 years ago
Thanks for this. This is a change that was made in the 2.0 version. Would it 
work for you to use getViews() and then filter out the text views from what is 
returned?

Original comment by renasr...@gmail.com on 30 Mar 2011 at 8:27

GoogleCodeExporter commented 9 years ago
I was able to work around it via getActivity().findViewById(), which I didn't 
realize I could do from the test app.

Would be great to see the change log on the Wiki or Project Home page somewhere 
:)

Thanks!

Original comment by nicjan...@gmail.com on 30 Mar 2011 at 3:48

GoogleCodeExporter commented 9 years ago
Great is 2.2 working well for you compared to 1.9? :)

Original comment by renasr...@gmail.com on 30 Mar 2011 at 3:50

GoogleCodeExporter commented 9 years ago

Original comment by renasr...@gmail.com on 30 Mar 2011 at 5:15