-
-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change the ViewPager methods to apply only on displayed widgets #17
Comments
@Sloy I'll love to have feedback on this idea :·D |
Wut? A ViewPager inside a ViewPager both with the same id? That sounds wrong :/ |
Nope, a ViewPager that contains a page that has a ViewPager. So, the ID of the second ViewPager will appear in every page of the first ViewPager, so it will be repeated in the hierarchy tree. |
Now I get it. |
Yes, totally. It could apply to lots of things. But, excepting in the Buttons where we do the magic of scrolling until needed, when are you interested in tapping a button that is not visible? Something to thing about it. No hurries, by the way. |
Done at #51 ! |
In one case, we have a ViewPager inside a ViewPager. Then, the ViewPager that we want to move is repeated over lots of times inside another ViewPager. That makes Espresso to launch a "multiple ViewPagers match that ID". But well, obviously, we want to interact with the ViewPager that is visible.
So:
onView(allOf(ViewMatchers.withId(R.id.the_id), ViewMatchers.isDisplayed())).perform( new ViewAction[] { ViewActions.swipeLeft() });
The text was updated successfully, but these errors were encountered: