xiaofans / robotium

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

searchText and FragmentPagerAdapter #475

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. create project with FragmentPagerAdapter
2. write Robotium test with searchText for a fragment not displayed
3. run the test and it will pass, no matter if the onlyVisible is true or false

What is the expected output? What do you see instead?
I would expect that passing onlyVisible as true that it would only check on 
what is physically on-screen at that point, instead it passes even if the 
currently displayed fragment contains the screen or not

What version of the product are you using? On what operating system?
Robotium 4.1, Android 4.2.2

Please provide any additional information below.
Screen shot of what I'm searching:
https://fbcdn-sphotos-h-a.akamaihd.net/hphotos-ak-prn1/1012765_10151997419763242
_562459424_n.jpg
code which is used in the Assert:
Assert.assertTrue("Loaded Profile?", solo.searchText("Statement goes here", 
true));
this is the following screen where the above Assert SHOULD return true:
https://fbcdn-sphotos-c-a.akamaihd.net/hphotos-ak-prn2/971385_10151997437608242_
1861746135_n.jpg

I would expect that the onlyVisible parameter who check what's actually 
visible...

I hope we can get this resolved,
Thanks,
Phil

Original issue reported on code.google.com by philip.r...@gmail.com on 21 Jun 2013 at 9:56

GoogleCodeExporter commented 9 years ago
What robotium does is to ask the views if they are shown by View.isShown(). If 
they return true they will be  searched. The issue you are describing is due to 
isShown() returning true even though it should return false.

Unfortunately nothing can be done from Robotium to get around this.  Please 
submit this to the Google Android platform team. 

Original comment by renasr...@gmail.com on 24 Jun 2013 at 2:11

GoogleCodeExporter commented 9 years ago
any updates on this issue?

Original comment by el...@buynando.com on 30 Jun 2015 at 3:27