Using Control Property Data in a Visual Test

Silk Test Workbench lets you use property values of any control in a test application as data in a visual test. To do this, you set the property variable to a local variable that has been defined in the visual test. For example, you can set the ID of a control to a variable, then use the variable in test logic to ensure no other control in the application uses the same ID.

The properties that can be set to a variable depend on the properties available for a control. Not all controls have the same set of available properties.

To set a control property value to a variable, the variable must be created for the visual test.

  1. Open the visual test in which you want to set a control property to a variable.
  2. Create a local variable to hold the value of the control property.
  3. Select the step that precedes where you want to insert the step to set the control property to a variable. Make sure the application containing the control with the desired property data will be available at the point in the test where the step is inserted.
  4. Choose Insert > Property from Control. The step is created after the selected step. Properties for the step appear in the Properties pane.
  5. In the Properties pane, in the Locator text box, identify the control to which you want to assign a variable.
    • 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.
    • Select – Click this button to assign a literal, variable, expression result, or ActiveData value.
  6. From the Property list, specify whether to use a literal, variable, expression, or ActiveData as the property of the control. This value is stored in the local variable.
  7. From the Local variable name list, select the variable to use with the control and property that you selected.
  8. Optional: Edit the Miscellaneous category properties to describe general information about the step.