Android UIAutomator with Kotlin

UIAutomator it’s similar to Espresso, but with UIAutomator you can automate tests outside and inside of the app. The code below shows how to do clicks and scroll on Android device settings. The test opens the device settings and clicks to reset the Google advertising ID. Look at the demo video at the bottom.

How to run:

dependencies {
androidTestImplementation 'androidx.test.uiautomator:uiautomator:2.2.0'