How to print Output Values in QTP/UFT with Example

What is the Output Value?

An output value step is a step in which an object property value is captured at a specific point in your test and stored at the desired location. The stored values can be used as input at different points in a test script

Types of Output Values in Micro Focus UFT

  • Standard output value
  • Text /Text Area output value
  • Database output value
  • XML output value (from application/resources)

Creating an Output Value is very similar to creating a Checkpoint. A Standard output value can be used on any object to an output value of any of its properties. You can select one or many properties from the same object as output. Following the video, gives steps to create a standard output value to print.

Click here if the video is not accessible

During run time, HP QTP stores output value in datasheet which is cleared as soon as a test is over.

Code Example:

SystemUtil.Run "C:\Program Files\HP\samples\flight\app\flight.exe"
Dialog("Login").WinEdit("Agent Name:").SetDataTable("AgentName",dtGlobalsheet)
Dialog("Login").Dialog("FlightReservations").Static("Please enter agent name").OutputCheckPoint("ErrorMessage")