openDrawer from espresso contrib is deprectaded

Question!

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

then how should I open a drawer?



Answers

You can try this out! This will get the menu from toolbar, and press a click on him

onView(allOf(withContentDescription("Menu"),
             withParent(withId(R.id.toolbar)),
             isDisplayed())).perform(click());
By : Catluc


This video can help you solving your question :)
By: admin