hellofenghao / robotium

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

solo.scrollListToBottom(int index) #461

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Activity with multiple lists in fragments
2. solo.scrollListToBottom(solo.getCurrentViews(ListView.class).size)
3.

What is the expected output? What do you see instead?
I expect the last list to be scrolled to the bottom and then continue with the 
script, instead it scrolls to the bottom and then the test fails with 
junit.framework.AssertionFailedError: 3 ListViews are not found!

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

Please provide any additional information below.

Original issue reported on code.google.com by heig...@gmail.com on 21 May 2013 at 8:58

GoogleCodeExporter commented 9 years ago
Thanks for reporting this. What is the next step in the test case? Can you 
please paste the complete test case. 

Original comment by renasr...@gmail.com on 21 May 2013 at 11:30

GoogleCodeExporter commented 9 years ago
Well I have deleted this testcase already and worked around it.
But basically I was just trying out this method to click list items, I tried 
with different steps after this method and none of them seemed to work.

public void testB_voting() throws Exception {
        solo.waitForActivity("MainActivity", LONG_TIMEOUT);
                Log.i(TAG, solo.getCurrentViews(ListView.class).size); //Log confirmed 4 listviews were found
                solo.scrollListToBottom(3);
                Thread.sleep(3000);
}

Original comment by heig...@gmail.com on 21 May 2013 at 12:34

GoogleCodeExporter commented 9 years ago
As the scroll was performed the exception was not thrown by 
scrollListToBottom(). The exception was thrown by a method called later in the 
test case. Probably all 4 ListViews where not shown when the failing method was 
called.

Original comment by renasr...@gmail.com on 21 May 2013 at 12:40

GoogleCodeExporter commented 9 years ago
That is correct, all the listviews are in different fragments. 1 is in a 
slidemenu and other 3 are in viewpager.

Original comment by heig...@gmail.com on 21 May 2013 at 12:59

GoogleCodeExporter commented 9 years ago
I think that was the issue. Let me know if you find anything more on this and 
I'll open this issue up again. 

Original comment by renasr...@gmail.com on 21 May 2013 at 1:02