I have a unique situation here. I am testing an app using Robotium and I am doing this under "black box" conditions. In my test, I have a tab titled 'all' and it is at the top of the screen, and I want to test that when it is clicked, all the available items are listed. What happens though, is instead of clicking the 'all' tab, the app titled "Advanced Call Manager" is being clicked. I assume that this is because 'all' is part of 'call' and due to the the way Robotium works, it clicks on 'all' even though it is part of 'call'. After you look at my code, you might understand what my issue is.
So my question is:
Is there a way to "reset" Robotium so that when it does its search for text, it starts at the top of the page? Here is my code:
solo.waitForText("all");
bw.write("Verify presence of 'all' filter on " + BUSINESS + "-COMMUNICATION page\",\"");
if(solo.searchText("all")==false){
bw.write("FAILED \",\" \'all\' filter not found \"\n\"");
}else if(solo.searchText("all")==true){
bw.write("PASSED \",\" \'all\' filter present\"\n\"");
bw.write("Verify functionality of 'all' filter\",\"");
solo.clickOnText("all");
solo.sleep(5000);
solo.takeScreenshot();
bw.write("Screenshot taken\",\"" +"See photo: "+ photoFormat.format(new Date()).toString()+"\"\n\"");
}
Any help would be appreciated!