Defining Parameters to Pass Between Visual Tests

When calling a visual test as a test step from another visual test, you can pass parameters between these visual steps. We will refer to the calling visual test as the host test and to the called visual test as the child test.
  • To pass a parameter from the host test to the child test, you have to specify the parameter as an input parameter for the child test.
  • To pass a parameter from the child test to the host test, you have to specify the parameter as an output parameter for the child test.
  1. If you want to pass parameters from the host test to the child test, add the parameters as input parameters to the child test:
    1. Open the child test.
    2. Select the Start step.
    3. In the Properties pane, select Input Parameters.
    4. Click Add Parameter. The Add Parameter dialog box opens.
    5. In the Parameter Name field, type a name for the new parameter.
    6. From the Type list, select the data type that you want to pass to the visual test.
    7. Leave the default value in the Initial Value field.
    8. Click OK.
      The input parameter displays in the list of input parameters in the Properties pane.
      Note: Input parameters defined for a visual test do not appear in the visual test steps. You can view the input parameters in the Properties pane of the Start step.
    Note: The value that you send from the host test is not saved in the child test, but you can use the value in computations in the child test.
  2. If you want to pass parameters from the child test to the host test, add the parameters as output parameters to the child test:
    1. Open the child test.
    2. Select the Start step.
    3. In the Properties pane, select Output Parameters.
    4. Click Add Parameter. The Add Parameter dialog box opens.
    5. In the Parameter Name field, type a name for the new parameter.
    6. From the Type list, select the data type that you want to pass from the visual test.
    7. Leave the default value in the Initial Value field.
    8. Click OK.
      The output parameter displays in the list of output parameters in the Properties pane.
      Note: Output parameters defined for a visual test do not appear in the visual test unless they are actually declared in the visual test. You can view the output parameters in the Properties pane of the Start step.
    9. Open the host test.
    10. Add a local variable for any parameter that you want to pass from the child test to the host test.
  3. To view up-to-date parameters of the child test, click the Name text box in the Properties pane of the Start step of the child test, and then click Refresh Parameters.