UiAutomator2
UIAutomator2 is an Android UI testing framework that enables automated interaction with the user interface across apps and the system. It serves as an evolution of the original UIAutomator framework, offering improved stability and cross-app testing on modern Android devices. Tests using UIAutomator2 can simulate user actions such as taps, swipes, text input, and navigation, and they can inspect properties of visible UI controls.
The framework operates with a client-server architecture. A test APK on the host installs and communicates
Key capabilities include cross-app automation, access to system UI, and the ability to interact with elements
Limitations include reliance on instrumented testing on devices, potential flakiness with dynamic UIs, and slower execution