Skip to content

Instantly share code, notes, and snippets.

@heitorpaceli
Created July 7, 2021 14:29
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/a2dc4d833c7271ba45916d8708d2861e to your computer and use it in GitHub Desktop.
Save heitorpaceli/a2dc4d833c7271ba45916d8708d2861e to your computer and use it in GitHub Desktop.
Get UiDevice instance - UiAutomator article on Medium
package com.paceli.wifitest
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.uiautomator.UiDevice
import org.junit.Test
import org.junit.runner.RunWith
@RunWith(AndroidJUnit4::class)
class WifiTest {
private val device: UiDevice
init {
val instrumentation = InstrumentationRegistry.getInstrumentation()
device = UiDevice.getInstance(instrumentation)
}
@Test
fun validateWifi() {
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment