Output Value types

Relevant for: GUI tests and components

You can create the following categories of output values:

Standard Output Values

You can use standard output values to output the property values of most objects. For example, you can use standard output values to output text strings by specifying the text property of the object as an output value in a keyword component. In a Web-based application, the number of links on a Web page may vary based on the selections a user makes on a form on the previous page. You could create an output value in your test or scripted component to store the number of links on the page.

File Content Output Values

You can use file content output values to output the contents from any of the following file types:

  • HTML files

  • Word (.doc) files

  • Text files

  • PDF files

  • RTF files

You can create output values from the entire contents of a file, or from a part of it. During the run session, UFT retrieves the current data from the file and outputs the values according to the settings that you specified.

Table Output Values

Table output values are a subset of standard output values. You can use table output values to output the contents of table cells. For some types of tables, you can specify a row range from which to choose the table cells. During the run session, UFT retrieves the current data from the specified table cells according to the settings that you specified and outputs the values to the Data pane.

Text and Text Area Output Values

You can use text output values to output text strings displayed in an application. When creating a text output value, you can output a part of the object's text. You can also specify the text before and after the output text.

You can use text area output values to output text strings displayed within a defined area of a screen in a Windows-based application.

For example, suppose that you want to store the text of any error message that appears after a specific step in the Web application you are testing. Inside the If statement, you check whether a window exists with a known title bar value, for example Error. If it exists, you output the text in this window (assuming that the window size is the same for all possible error messages).

Database Output Values

You can use database output values to output the value of the contents of database cells, based on the results of a query (result set) that you define on a database. You can create output values from the entire contents of the result set, or from a part of it. During the run session, UFT retrieves the current data from the database and outputs the values according to the settings that you specified.

XML Output Values

You can use XML output values to capture and output the values of XML elements and attributes in XML documents.

For example, suppose that an XML document in a Web page contains a price list for new cars. You can output the price of a particular car by selecting the appropriate XML element value to output.

Existing Output Values

When you insert an existing output value in your test or scripted component, consider which output values should be used in multiple locations in your test or component. Each time an output value step is performed, the value contained in the output value is overwritten with the new output value. You should insert an existing output value only if the stored value will no longer be needed later in the run session when the output value object is used again.

For details, see Add Existing Output Value Dialog Box.