Using conditional commands allows you to perform actions only when specific conditions are met.
Use Cases
- Perform the logout process only if the user is logged in
- Click the "Close" button only if a pop-up is displayed
- Check a checkbox only if it is not already checked
Basic mechanism
When a condition is met, the steps within the following range are executed:
- From after the condition command ("If ~")
- Until before the next conditional branching command ("Otherwise if ~", "Otherwise", "End branch")
For the types of conditions available, please refer to the command list.
Complex conditional branching
By combining "Otherwise if ~" and "Otherwise" commands, you can describe complex test procedures.
Process Flow
- Check the condition of "If ~"
- If the condition is met → Execute the commands that follow
- If the condition is not met → Move to the next conditional branching command
- Check the condition of "Otherwise if ~"
- If the condition is met → Execute the commands that follow
- If the condition is not met → Move to the next conditional branching command
- "Otherwise"
- Execute the process when all conditions are not met
- End the conditional branching block with "End branch"
How to Insert Conditional Branching Commands
When adding "Otherwise if ~" or "Otherwise", you can insert them from the right-click menu.
- Display the menu using one of the following methods on a step between "If ~" and "End branch":
- Right-click on the test step
- Click the menu icon that appears when you hover your mouse cursor over the right edge of the test step
- Select the command you want to add from "Insert conditional branch command"
※After inserting "Otherwise if ~", use the command selector to change it to the appropriate condition command.
About Structure Errors
When inserting or moving "Otherwise if ~" or "Otherwise", if the structure of the conditional branching becomes inappropriate, a step error will be displayed.
While a step error is displayed, the following operations cannot be performed:
- Test execution
- Creation of shared steps