I`m getting
android.support.test.espresso.PerformException: Error performing \'send keyCode: 4, metaState: 0 key event\' on view \'Animations or tra
Animations or transitions are enabled on the target device.
Espresso doesn't work well with animations due to the visual state delays they introduce. You need to disable animations on your device. Firstly, enable developer options:
Access Developer Options from Settings app, and under the Drawing section, switch all of the following options to Animation Off: