Skip to content

Instantly share code, notes, and snippets.

@heitorpaceli
Last active Nov 3, 2021
Embed
What would you like to do?
Launching Settings - UI Automator article on Medium
@Test
fun validateWifi() {
// Open apps list by scrolling on home screen
val workspace = device.findObject(
By.res("com.google.android.apps.nexuslauncher:id/workspace")
)
workspace.scroll(Direction.DOWN, 1.0f)
// Click on Settings icon to launch the app
val settings = device.findObject(
By.res("com.google.android.apps.nexuslauncher:id/icon").text("Settings")
)
settings.click()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment