Automatically parameterizing steps

Relevant for: GUI tests only

You can instruct UFT to automatically parameterize the steps in your test actions at the end of a recording session. This enables you to create actions that can be used for a variety of different purposes or scenarios by referencing different sets of data.

To activate this option, select the Automatically parameterize steps option in the General node of the GUI Testing tab of the Options dialog box (Tools > Options > GUI Testing tab > General node). You can set the option to use Global Data Table Parameters or Test Parameters. For details, see General Pane (Options Dialog Box > GUI Testing Tab).

When you stop a recording session while this option is selected, UFT replaces the constant values in the test object operation arguments of your steps with either Data pane parameters or action parameters, based on your selection of global Data pane parameters or test parameters in the Options dialog box.

In general, simple, constant (string, number, boolean) test object and utility object operation arguments are parameterized. Therefore, if the following are contained in a method argument, they are not parameterized:

  • arguments that are already parameterized

  • variables

  • enumeration constants, such as micLeftbtn

  • expressions, such as: x = 3

  • Assignments of values, such as: Window("Notepad").WinMenu("Menu").ExpandMenu = True

  • mathematical or other concatenation operations, such as "Hello World" & micCtrl & "S"

  • VBScript statements, such as msgbox "hello"

  • VBScript language statements such as For, If, Do, While

  • steps inside called functions from function libraries or in functions or sub-routines defined directly within the action