I\'m trying to run some automated tests in Robotium by iterating through a list and clicking on each list element to start another activity. I have the code below in my test
I see a couple of problems:
Try this:
for(int i = 0; i < list.size(); i++) {
assertTrue("There are no listviews in this activity.", list.size() > 0);
chartPosition = 0; // just to be safe, point at the first item in the list.
for(int i = 0; i < list.size(); i++) {
solo.clickInList(chartPosition, i); // Note that "i" identifies the ListView
solo.waitForActivity("name.of.the.expected.activity");
}
...
}
Disclaimer - This suggestion is based purely on code inspections and Robotium Solo Javadoc: http://www.jarvana.com/jarvana/view/com/jayway/android/robotium/robotium-solo/1.4.0/robotium-solo-1.4.0-javadoc.jar!/com/jayway/android/robotium/solo/Solo.html#clickInList(int)