danielgomezrico danielgomezrico - 1 year ago 116
Android Question

openDrawer from espresso contrib is deprecated

Espresso contrib (

com.android.support.test.espresso:espresso-contrib:2.2.1
) openDrawer method is deprecated

then how should I open a drawer?

Answer Source

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());