Step result as a condition in an If statement

Hi all,
I would like to use one step result as a condition for the If statement.
For exemple :

test step 1
if (test step 2 result = passed)
** test step 2**
test step 3
test step 4

Is there any simple way to do this?

I presume it should be “step 1” inside of the if condition.

If that is true, than you can assign a boolean value to the test step 1. Many of the WebUI commands return true/false as the result. So:

boolean a = test step 1
if (a==true){
step 2
} else {
step 3
step 4