How can I set up conditional statements (if-else) on test steps in a test?
Question ID: 325
2
0

I want to set up the conditional statement(if-else) on the test steps, How can I do that?

Marked as spam
Posted by (Questions: 16, Answers: 0)
Asked on June 15, 2023 7:38 am
11 views

Answers (1)

1
Private answer

Any step that contains one or more children is a conditional statement meaning that the children only execute if the parent steps completes successfully.  A great example would be the dismissal of a popup window.

  1. Is popup visible
    1. dismiss popup

A simple example, but you would only dismiss the popup if the popup was visible.  Now, by default any test step that fails causes the test to fail so if the popup did not exists, then the test would fail which is clearly not the desired outcome.  To remediate that, the parent step must have the error threshold set to the appropriate level.  In most cases, we want to ignore all failures.  Now, when this step runs and fails then we continue onto the next step; however if it succeeds, then we execute the sub steps first then continue to the next step.

Hope that helped

cm

Marked as spam
Posted by (Questions: 0, Answers: 38)
Answered on June 15, 2023 7:45 am

Welcome to Alchemy Center!
Please Log In to participate in the discussion.

X
Scroll to Top