Skip to content

Instantly share code, notes, and snippets.

@heitorpaceli
Last active Nov 3, 2021
Embed
What would you like to do?
Adding network - UI Automator medium article
// ...
// Obtain an instance of UiObject2 of the text field
val ssidField = device.wait(Until.findObject(By.res("com.android.settings:id/ssid")), 2000)
// Call the setText method using Kotlin's property access syntax
val ssid = "AndroidWifi"
ssidField.text = ssid
//Click on Save button
device.findObject(By.res("android:id/button1").text("Save")).click()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment