To bypass a login screen in a baseline profile generator, i would like to enter credentials. However the text
property seems bugged. Is there a different way to interact with compose TextFields in a BaselineProfile script?
Including a Compose rule seems not working either. This resulted in a compile error.
For example:
@RunWith(AndroidJUnit4::class)
@LargeTest
class BaselineProfileGenerator {
@get:Rule
val rule = BaselineProfileRule()
@Test
fun generate() {
rule.collect(
packageName = "com.exaple.app",
includeInStartupProfile = true
) {
pressHome()
startActivityAndWait()
device.findObject(By.text("User name")).text = "baseline_username"
device.findObject(By.text("Password")).text = "baseline_password"
device.findObject(By.res("submit")).click()
}
}
}