Skip to content

Instantly share code, notes, and snippets.

@heitorpaceli
Last active Nov 3, 2021
Embed
What would you like to do?
Add wifi network - UI Automator medium article
// ...
// Wait up to 2 seconds for the element be displayed on screen
val networkAndInternet = device.wait(Until.findObject(By.text("Network & internet")), 2000)
networkAndInternet.click()
// Click on element with text "Wi‑Fi"
val wifi = device.wait(Until.findObject(By.text("Wi‑Fi")), 2000)
wifi.click()
// Click on element with text "Add network"
val addNetwork = device.wait(Until.findObject(By.text("Add network")), 2000)
addNetwork.click()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment