Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to open Navigation Drawer using espresso?

I have tried DrawerActions.open() but it is showing undefined. Is there any other ways to access navigation drawer ??

Please suggest.

Is something wrong with DrawerActions class of espresso,I am unable to View it. If you have any thoughts please share.

like image 988
Shubham Khare Avatar asked Mar 01 '17 13:03

Shubham Khare


1 Answers

Check if you're missing the espresso-contrib library on your build.gradle file.

androidTestImplementation 'com.android.support.test.espresso:espresso-contrib:3.0.2'

If in case you are using androidx,

androidTestImplementation 'androidx.test.espresso:espresso-contrib:3.2.0'

Check other useful espresso extension libraries on the following link - https://developer.android.com/training/testing/espresso/#packages

like image 171
João Magalhães Avatar answered Sep 21 '22 14:09

João Magalhães