austgl / robotium

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

getCurrentListView() method does not get ListView from current page #173

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Page A has one ListView, and TextView textV is in this ListView's first 
ItemView.
   Page B is Page A's next page, there is no textV in Page B.
2. The current page is Page B, then run these code.
   ArrayList<ListView> viewlist = solo.getCurrentListView();
   View first = viewlist.get(0).getChildAt(1);
   TextView textV = (TextView)first.findViewById(R.id.textV);
   solo.clickOnView(textV);

What is the expected output? 
It should have error, like cannot find the view.
Because textV is not in Page B, but we run the code when current page is Page B.

What do you see instead?
No any error.

What version of the product are you using? On what operating system?
Robotium 2.5, Android OS 2.2

Please provide any additional information below.

Original issue reported on code.google.com by derek110...@gmail.com on 14 Oct 2011 at 9:18

GoogleCodeExporter commented 9 years ago
The list view still exists. It is probably set to invincible when going to page 
5. The list however still exists and that is why it is returned to you.

Original comment by renasr...@gmail.com on 15 Oct 2011 at 12:18