ui/espresso/MultiWindowSample/README.md
Android's Window system allows multiple view hierarchies to layer on top of each other.
A real world analogy would be an overhead projector with multiple transparencies placed on top of each other. Each Window is a transparency, and what is drawn on top of this transparency is the view hierarchy.
By default Espresso uses a heuristic to guess which Window you intend to interact with. This heuristic is normally 'good enough' however if you want to interact with a Window that it does not select then you'll have to swap in your own root window matcher. Initially there's only one window, but typing into the auto-complete text view creates another window that will be layered on top of the screen. Espresso ignores this layer because it is not connected to the keyboard/ime.
Espresso provides the ability to switch the default window matcher used in both onView and onData interactions.
This project uses the Gradle build system. You don't need an IDE to build and execute it but Android Studio is recommended.
git clone../build.gradle file.src/main/javasrc/androidTest/javaandroidx.test.runner.AndroidJUnitRunner
androidx.test.runner.AndroidJUnitRunnerThe application will be started on the device/emulator and a series of actions will be performed automatically.
If you are using Android Studio, the Run window will show the test results.