Defining the Script Input Parameters

Scripts can receive data from a visual test in an input parameter, and, conversely, pass data to visual tests in an output parameter. In this task, you will define two input parameters that set the range for the random number created in the function_randomAge script.

  1. In the Properties pane, right-click and choose Add Input Parameter.
    The Add Script Input Parameter dialog box opens.
  2. In the Name text box, type MinVal.
  3. From the Type list, select Number (Double).
  4. In the Default Value text box, type 16. Optionally, you can set the default value in the visual test.
  5. Click OK.
    The input parameter displays in the list of input parameters in the Properties pane.
  6. In the Properties pane, right-click and choose Add Input Parameter.
    The Add Script Input Parameter dialog box opens.
  7. In the Name text box, type MaxVal.
  8. From the Type list, select Number (Double).
  9. In the Default Value text box, type 105. Optionally, you can set the default value in the visual test.
  10. Click OK.
    The input parameter displays in the list of input parameters in the Properties pane.