Using conditional commands allows you to perform actions only when specific conditions are met. For example, using the if variable equals command, you can perform actions like store the number 30 in a variable only for specific months. When the if condition is satisfied, the actions between this if command and the next conditional branching command (Otherwise if, Otherwise, End branch) are executed.
Additionally, you can insert Otherwise if and Otherwise commands to define more complex test cases. For example, when using both the If command and the Otherwise if command in your conditional branching, if the condition of the If command is not met, the Otherwise if command is evaluated next. If this Otherwise if condition is satisfied, the subsequent commands are executed. Conversely, if this Otherwise if condition is not satisfied, the evaluation moves to the next conditional branching command.
To insert Otherwise if or Otherwise commands, you can use the right-click menu. To display the right-click menu, either right-click anywhere between the If and End branch commands, or hover over the right edge of a test step to reveal the ⋮ button and click it. When inserting conditional commands, use the command selector to choose the appropriate conditional branch command.
If inserting or moving Otherwise if or Otherwise commands results in an incorrect structure, a step error will be displayed, and test execution or shared step creation will be restricted. When a step error occurs, the test case will be saved with an automatically corrected structure, which may not always align with your intended execution flow. Please resolve any shown step errors to ensure the test case runs as intended.