Condition not met, can I skip remaining test steps or several test steps?

Hello, if a condition is not met with several if / else if statements, is there a way to “skip the remaining test steps or several test steps because they are unnecessary”? Thank you!

You could add a boolean of isConditionMet above your IF-ELSE-IF statements. Then change the vaule of isConditionMet within those statements. When you get to the steps that you could skip, wrap those in an IF-isConditionMet-then block.

boolean isConditionMet = false
if (myText.contains(‘Login’) {
// I need to tap the Login button …
isConditionMet = true
}

if (isConditionMet) {
tap(loginButton)
}

1 Like

I forgot to thank you David! I appreciate the help!!