tempSelector, tempValue (Vision)
You can register and get value on demand with these functions for temporary use.
functions
function | description |
---|---|
tempSelector(nickname, expression) | Register expression as nickname |
tempValue(nickname) | Get value by nickname |
Sample code
TempSelector1.kt
(src/test/kotlin/tutorial/basic/TempSelector1.kt
)
@Test
@Order(10)
fun tempSelector1() {
tempSelector("{First Item}", "Network & internet")
scenario {
case(1) {
condition {
it.macro("[Android Settings Top Screen]")
}.action {
it.tap("{First Item}")
}.expectation {
it.screenIs("[Network & internet Screen]")
}
}
}
}
@Test
@Order(20)
fun tempValue1() {
scenario {
case(1) {
condition {
tempSelector("{nickname1}", "value1")
}.expectation {
tempValue("{nickname1}").thisIs("value1")
}
}
case(2) {
condition {
tempSelector("{nickname1}", "value2")
}.expectation {
tempValue("{nickname1}").thisIs("value2")
}
}
}
}