Skip to content

Instantly share code, notes, and snippets.

@heitorpaceli
Last active November 3, 2021 01:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save heitorpaceli/4f04242c313f9ad502799e440a7c586b to your computer and use it in GitHub Desktop.
Save heitorpaceli/4f04242c313f9ad502799e440a7c586b to your computer and use it in GitHub Desktop.
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