austgl / robotium

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

searchText always return true if parm onlyVisible is set to true when the view contains the text is hiden after the first round searchText #125

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.searchText("abc",true)   //"abc" on a Textview on Activity A
2.Activity hides TextView with text "abc"
3.searchText("abc", true) again, it returns true;

Code here:
 for (int j = 0 ;j < 10;j++{
    int i = 0;
    while(i < 24){
        i++;
        solo.sleep(5000);
        if(solo.searchButton("Delete",true)){  
                  //It hits here when round 2 (j=2), even if the botton is not visible.
                    solo.sleep(1000);
                    solo.clickOnButton("Delete");
                    solo.sleep(1000);
                    solo.clickOnButton("OK");
                    break;
                }

            }

            solo.clickButton("Download");    
            //When downloading,before it finish, a progressbar occupies button "Delete" position.
}

What is the expected output? What do you see instead?
expected: searchText returns false at sencond round.
actual:  searchText returns trun at sencond round.

What version of the product are you using? On what operating system?

2.3
PC: windows7
Mobile: Android 2.1-upadte
Please provide any additional information below.

Original issue reported on code.google.com by ant...@gmail.com on 1 Jul 2011 at 10:18

GoogleCodeExporter commented 9 years ago
Is it possible for you to share this application or another application that 
reproduces the problem?

Original comment by renasr...@gmail.com on 11 Jul 2011 at 7:32

GoogleCodeExporter commented 9 years ago
it is one more

Original comment by hareesha...@gmail.com on 13 Jul 2011 at 7:27

GoogleCodeExporter commented 9 years ago
What the onlyVisible parameter does is that it only searches the views that are 
not View.GONE and View.INVISIBLE. Probably your view is still there but just 
covered by an activity.

Original comment by renasr...@gmail.com on 13 Jul 2011 at 5:29