Data table parameters

Relevant for: GUI tests and scripted GUI components

You can supply the list of possible values for a parameter by creating a data table parameter. Data table parameters enable you to create a data-driven test, or action that runs several times using the data you supply. In each repetition, or iteration, UFT uses a different value from the Data pane (taken from the subsequent row in the Data pane).

When you create a new data table parameter, a new column is added at the end of the Data pane and the current value you parameterized is placed in the first row. If you parameterize a value and select an existing data table parameter, the values in the column for the selected parameter are retained and are not overwritten by the current value of the parameter.

Note: If you parameterize a value that is defined as a variant value, then when UFT retrieves the value from the Data pane, it retrieves it as a string. This occurs even if you enter a numeric value in the Data pane. For example, if you parameterize the argument of a step such as: WpfWindow("MyWindow").WpfComboBox("cb").Select 1 and you enter the value 1 in the Data pane, then when the step runs, it retrieves the value as a string: "1", and the step fails.


  • Suppose your application includes a feature that enables users to search for contact information from a membership database. When the user enters a member's name, the member's contact information is displayed, together with a button labelled View <MemName>'s Picture, where <MemName> is the name of the member. You can parameterize the name property of the button using a list of values so that during each iteration of the run session, UFT can identify the different picture buttons.
  • Consider the Mercury Tours sample Web site, which enables you to book flight requests. To book a flight, you supply the flight itinerary and click the Continue button. The site returns the available flights for the requested itinerary.

    Although you could conduct the test by accessing the Web site and submitting numerous queries, this is a slow, laborious, and inefficient solution. By using data table parameters, you can run the test for multiple queries in succession.

    When you parameterize your test, you first create steps that access the Web site and check for the available flights for one requested itinerary.

    You then substitute the existing itinerary with a data table parameter and add your own sets of data to the relevant sheet of the Data pane, one for each itinerary.

    In this example, UFT submits a separate query for each itinerary when you run the test.