Clicking a button in Espresso test got problem. Let\'s say I have two activities \"Activity1\" and \"Activity2\". Click a dialog OK button in Activity1 starts Activity2 wher
Seems your view with id R.id.btnMP
is not visible at the screen so you are receiving the first error. You are trying to resolve this by scrollTo()
but your view in not inside ScrollView. So how your activity is organized? If you are using RecyclerView
(for example) you should use special version of scrollTo - http://developer.android.com/reference/android/support/test/espresso/contrib/RecyclerViewActions.html and so on. So first take a look where your view is hosted and then it will be clear how to scroll to it.