Author: June 6, 2016. ,
The Switch block compares the Input value to the cases values using a comparison method such as “equals” or “less than or equal to” and others. The block helps to branch the flow.
Fully expanded, the Switch block shows the following properties:
The Block Header (“Switch”)
The green input connector in the header is used to trigger the block to start executing.
Each case has a green output connector triggered if the comparison method specified was met.
The title of the block (“Switch”) can be changed by double-clicking on it and typing in a new title.
The value to use in the comparison. It can be typed in the field or fed as input from the previous block.
Add case (branch) to compare to the input field. Leaptest will execute the first case branch that meets the comparison method specified.
Triggers when the comparison results in an unsuccessful or false outcome, when none of the cases meet the comparison method.
Select which comparison method to use (Equal, Not equal, Greater than, Greater than or equal, Less than or Less than or equal).
Select which data type to use for the comparison. Values are automatically converted to appropriate data types, but in certain cases it can make sense to select which type to use.
Choosing the wrong comparison type can have unforseen consequences, so choose carefully. For instance, comparing the text “200,200” with the position 200,50 results in false, but comparing position 200,200 with position 200,50 results in true.