When adding conditional logic to a visual test, use the
Select the Condition dialog box to select a value or to create a literal value for a condition in the
Condition Designer.
Select a (Literal) – Select this option to display the following literal option:
Literal data – Enter either a text string, a number, or a boolean (true or false) value, and then click
OK.
In the
Define a condition area of the
Condition Designer, click
... to the right of the value text box that you want to populate.
The
Select the Condition dialog box opens.
Select the type of the value:
Click
Property to select a property of a control.
Click
Variable to select a variable.
Click
ActiveData to select an active data asset.
Click
Literal to create a new literal value, which can be a string, a number, or a boolean value.
Click
Exists to select a verification of whether a specified control exists.
If you have selected
Property, perform the following actions:
Expand the
Identify a Control menu and select one of the following:
Application Under Test – Click this button to identify a visible list or combo box control from your test application.
Screen Preview – Click this button to identify a list or combo box control directly from the
Screen Preview, if the application under test is not available.
Identify Object Dialog – Click this button to use the
Identify Object dialog box to identify a list or combo box control. The
Identify Object dialog box additionally enables you to edit the locator of the control.
After identifying a control, select the desired property from the
Properties list.
If you have selected
Variable, perform the following actions:
Select the variable type from the
Variable type list or click
New to create a new variable.
The following variable types are available:
Local – Select this to use a local variable, which is a variable that is typically defined and used within a single visual test, and which usually stores the values of other types of variables, for example global or passed-in variables.
Input Parameters – Select this to use a parameter that is passed in to the visual test.
Output Parameters – Select this to use a parameter that is passed out by the visual test.
Reserved – Select this to use a predefined variable, which stores information about the playback and the results of the visual test.
Select the desired variable from the
Variables list.
If you have selected
ActiveData, perform the following actions:
Expand the
Select menu to the right of the
ActiveData asset text box.
To create a new active data asset, click
New ActiveData.
For additional information, see
Creating a New Data File for ActiveData Testing.
To associate an existing active data asset, click
Associate existing ActiveData.
For additional information, see
Mapping Data in an ActiveData File to Data in a Visual Test.
After you have specified the active data asset, select the column that you want to use from the
Columns list.
If you have selected
Literal, type the string, number, or boolean into the
Literal data text box.
If you have selected
Exists, perform the following actions:
Expand the
Identify a control menu and select one of the following:
Application Under Test – Click this button to identify a visible control directly from the application under test.
Screen Preview – Click this button to identify a control directly from the
Screen Preview, if the application under test is not available.
Identify Object Dialog – Click this button to use the
Identify Object dialog box to identify a non-visible control. The
Identify Object dialog box additionally enables you to edit the locator of the control.
Select
Control exists to verify that the control exists.
Select
Control does not exist to verify that the control does not exist.
Type a value into the
Timeout field to specify how long
Silk Test Workbench should wait for the control to appear or to disappear.
The default timeout is 0, which means
Silk Test Workbench does not wait for the control to appear or to disappear.