Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
class ScreenRobot {
fun enterTextIntoView(@IdRes viewId: Int, text: String): T {
onView(withId(viewId)).perform(typeText(text))
closeKeyboard()
return this as T
}
}
class LoginRobot: ScreenRobot() {
fun inputPassword(pass: String): LoginRobot {
return enterTextIntoView(LOGIN_PASSWORD, pass)
}
companion object {
private val LOGIN_PASSWORD = R.id.login_password
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.