What are standard output values in QTP?
To get a property from the application at run time and stores in run time data table, and same can be used as input whenever it required is called standard output value.
How to Insert Standard Output values in QTP?
Let’s take an example of Flight Reservation
- Open QTP and login with username and password, Flight Reservation screen Opens up, now start recording by pressing F3 or Click Automation Menu->Record button
- In Recording mode, Navigate to Insert Menu->Output Value->Standard Output value, the mouse pointer turns into a pointing hand.
- Click the object in the application, if the location clicked is associated with more than one object, QTP opens “Select an object” dialog.
- Select the object for which an output value is to be specified
- Click ok button, the output value properties dialog box opens
- Select the value or data to be used as output value from the database, specify the settings for the output value
- Click OK button to close the output Value properties dialog box
- QTP will add an item in the keyword view and generate the script in the script view, the script will be
- Window(“Flight Reservation”).WinButton(“FLIGHT”).Output CheckPoint(“FLIGHT”)
- Make sure that the output value is stored in the data table, here the value will only be visible during run time and it can be seen in the run time table of result window, but the column name is seen in the data table.
- To Use this output value for further test, use data driver with parameterization to pass the value to be corresponding step of the same action or new action
- Run the programs ad view the Result
How to create a standard output value while editing the particular test.
- Make sure Active screen button is selected
- Click a step in the test where an output value is to be created
- Right Click the object for which an output value is to be created in the Active screen and choose Insert Output value, alternatively, right –click the step in the test tree and choose Insert Output value, if the location clicked is associated with more than one object, the object selection output value properties dialog box opens.
- Select the object for which an output value to be specified
- Click OK Button, the output value properties dialog box opens
- Indicate the settings for the output value
- Click ok button to close the output value properties dialog box
- Use data driver with parameterization to retrieve the output value from the data table and use it as the input for the step of the same action or new action.