I'm trying to run a UI test using UIAutomator on an application that exists outside of the project from which I am launching the test. Because I'm working with an application that is outside of my test project, I can't use Espresso with it (as far as I know). I want to open the left drawer on this application. Espresso had a very simple way of doing this

```
openDrawer(R.id.drawer_layout)

```

but it appears to be more complicated with UIAutomator.

Somebody asked a similar question elsewhere, and the recommendation given to them was that they should modify the drawer in the source code of the application they were testing so that UIAutomator could open it more simply. I don't have access to the source code of the application I want to test, though, so I unfortunately can't do that. It also seems like using general drag and swipe functions doesn't work so well either, but I'm not certain about that.

Is it possible to open a drawer using UIAutomator? If so, what's the best way?