- Created by SS Doc Editor, last modified by SS Doc Editor on Jun 22, 2020
An If...Then condition will execute its child objects if a given condition is true (or false). The condition will compare an extractor to a string to determine if the child objects should execute. To create an If...Then condition, follow the following steps: 1. Go to the Build Test Case node. 2. Select the starting object 3. Right mouse click to open the Context Menu and click Create Container -> Create If...Then. 4. A new object dialog will appear. 5. Select the last object in the condition. 6. Click Create If...Then. Quick Create: Another way to create a loop is to select multiple objects, the test case tree -> right-click -> select Create If...Then. This will create an If...Then around the selected objects. 7. In the Condition type property, select Match Extractor if you wish to evaluate an extractor's value to determine whether to skip the child objects. a. In the property Extractor to match, select an extractor of the drop-down to compare with the string. Note The extractor must be defined before the If...Then object b. In the property Text to match, enter a string to compare with the extractor. c. In the property Run the child objects if Match? select Yes to run the children when the extractor matches the String, and skip the children when the extractor does not match the String. Select No to skip the children when the extractor matches the String, and run the children when the extractor does not match the String. 7. In the Condition type property, select Match scriptable variable if you wish to evaluate a scriptable variable's value to determine whether to skip the child objects. d. In the property Scriptable variable to match, select a scriptable variable of the drop-down to compare its value with the string. e. In the property Text to match, enter a string to compare with a value of the scriptable variable returned by the IExternalVariable.GetValue() method. f. In the property Run the child objects if Match? select Yes to run the children when the scriptable variable's value matches the String, and skip the children when the scriptable variable's value does not match the String. Select No to skip the children when the scriptable variable's value matches the String, and run the children when the scriptable variable's value does not match the String. |
|
- No labels