Defining a Condition Using the Condition Designer

Use the Condition Designer dialog box to define or edit advanced test logic conditions.

  1. Access the Condition Designer from the Test Logic Designer wizard. Additionally, you can insert an If test step, select the Condition property in the Properties window, and then click Condition Designer. The Condition Designer opens.
  2. In the Value 1 text box of the Define a condition section, specify the first value of the condition, which can be the property of a control, any type of variable, an ActiveData asset, a literal value, or whether a control exists. You can enter the value directly in the text box or click ... to access the Select the Condition dialog box.
    Tip: After selecting a value, Silk Test Workbench displays the value type under the Value 1 text box.
    Note: Data types can be converted to other types, such as a Double converted to a Long, Text, or Boolean. However, it is important to understand how these conversions may affect your data. For more information converting data types, see Using Expression Designer Functions.
  3. From the Operator list, select the comparison operator. The comparison operator defines the comparison logic of the condition and how the two values in the condition relate to each other. The following operators are available:
    • Is Equal to ( == ).
    • Is Not Equal to ( ! = ).
    • Is Greater than ( > ).
    • Is Less than ( < ).
    • Is Greater than or Equal to ( > =).
    • Is Less than or Equal to (< =).
    • Contains: True if the text in Value 1 contains the text in Value 2. Else false.
    • Does Not Contain: True if the text in Value 1 does not contain the text in Value 2. Else false.
  4. In the Value 2 text box, specify the second value of the condition by following the same process used in step two to specify the first value.
  5. From the Evaluate as list, select the data type for the outcome of the evaluation of the condition. The available data types include:
    Text
    The variable's value is a text string. Text type values can contain letters, numbers, spaces, and punctuation.
    Note: The text data type is case sensitive, which means the cases of the individual characters in the text string must match during comparison. If the cases do not match, the comparison fails.
    Text (case insensitive)
    The same as text, except that, for a string comparison during the evaluation, the cases of the individual characters of the string do not have to match.
    Number (Long)

    The variable's value is a number ranging from -2,147,483,648 to 2,147,483,647. Periods (for a fractional/decimal value) cannot be used.

    Number (Double)

    The variable's value is a double-precision floating-point number, and is stored as a 64-bit number in the range -1.7E308 to +1.7E-307.

    Boolean (True/False)

    The variable's value is either True or False.

    Number (Long Long)

    A 64-bit integer value that can have a value in the range -9223372036854775808 to 9223372036854775807.

    Enumeration

    This variable groups together a set of values and orders them sequentially from 1 to n. You declare an enumerated type when you want a variable to hold only a limited number of distinct values. Use this variable type with properties or variables that expect an enumeration data type.

    An enumeration stores the numeric value in a 64-bit integer in the range -9223372036854775808 to 9223372036854775807. However, the engine only supports 32-bit enumerations, while the UI supports 64-bit enumerations (in future releases, the engine will support 64-bit enumerations).

  6. Click Add to add the defined condition to the Conditions table. Disregard the Logic list (AND, OR) when creating a single condition statement. Use the Logic list only when creating compound conditions.
  7. Optional: Click Move Up or Move Down to move a selected condition up a row or down a row respectively in the Conditions table. When moving a condition that includes a logical operator (AND, OR) to the first row of the Conditions table, the logical operator does not move with the condition. It remains in the second row to preserve the conditional logic structure.
  8. Optional: When you create compound conditions, create an additional condition using the previous steps, and then select the type of connector logic from the Logic list. Click Add to add the condition after the previously created condition.
  9. Optional: Click Remove to remove a selected condition from the Conditions table.
  10. Optional: Click Preview to display the defined condition in an easy-to-read text format.