What is Text Output value in QTP?
Capturing the text in the application and store it in runtime data table and use as input whenever it requires from the run time data table.
How to create a text output value during recording the application
Login with valid user name and password with Flight Application, Flight reservation window opens up
Open QTP and click on record button or Press F3 to record the test
Choose Insert Menu->Output value->Text Output value, the mouse pointer turns into a pointing hand.
Select the text that Quick test want to use an output value by clicking that particular text, if the text is associated with more than a object, “Object selection dialog with-Text Output Properties” opens up
Select the object for which an output value is to be specified, for example select “Date of Flight”
Click ok Button, the Text output value properties dialog box opens.
Enter the settings for the output value else modify using Modify button
Click OK button to close the Text Output Value Properties dialog box.
QTP will add an item in the keyboard view and generate the script; the script will look like below
Window(“Flight Reservation”).static(“Date of Flight:”).Output CheckPoint(“Date of Flight:”)
Make sure that the output value is stored in the run time data table, here, the value will only be visible during runtime and it can be seen in the run time table of result window, but the column name can be seen in the data table.
To Use this output value for further test, use data driver with parameterization to pass the value to the corresponding step of the same action or new action.
Run the program and view the result.
To create a text output value in qtp while editing the test:
Open Active screen or make sure is opened it.
Click a step in the test, where a text output value is to be created, the active screen displays web page or the application corresponding to the highlighted step.
In the active screen, highlight and then right-click the text string that wanted to specified as an output value.
Opt for Insert Text Output, The Text output value properties dialog box opens.
Mention the settings for the output value
Click Ok Button to close the text Value Properties dialog box.
With the help of data driver with parameterization to retrieve the output value from the data table and use it as input for the step of the same action or new action.