Espresso contrib (com.android.support.test.espresso:espresso-contrib:2.2.1
) openDrawer method is deprecated
then how should I open a drawer?
Here's an example on how to use the new open
and close
methods:
onView(withId(R.id.drawer_layout)).perform(DrawerActions.open());
onView(withId(R.id.drawer_layout)).perform(DrawerActions.close());