XML Output values in QTP – Tutorials and Examples

What are XML output values in QTP?

Get the value from XML file and use it as input during run time is called as XML output value

How to use XML output values in QTP-Examples?

Let’s take an example of Flight Application.

Open Flight Application, do login in to that

Do record by pressing F3 button in keyboard

To insert XML output->Choose From the menu, Insert->Output value->XML output value source

XML Output value from File dialog opens up

Provide the path of the XML file for which an output value is to be inserted and click on OK button

Now an XML output value properties window will be opened

XML Output values in QTP -XML Source Selection

In that select “Create output value step from XML File” and click the button to select XML file from the local system->Click ok button

XML Output values in QTP-Output Properties

XML output properties dialog with XML attributes will load in this dialog, select the attribute which you want to create XML output, after clicking attributes “Output options” dialog opens with default parameter type as “data table” and name as “attribute_xmlnsconstant_out” , Location in data table by default selected as “Global sheet” based on user preference select the location.

XML Output values in QTP - XML Output Properties

Click OK button to close the XML text output value properties dialog box

QTP will add an item in the keyboard view and generate the script in the script view, script will be

XMLFile(“sample1.xml”).output Checkpoint(“sample1.xml”)

Consider that the output value is stored in the data table after selecting the attribute, the value stored in the column will only be visible during run time and it would be seen in the run time table of result window.

To use this XML output value for further, use data driver with parameterization to pass the value to the corresponding step of the same action or new action.

Run the script and view the result produced by QTP.

Article Name
XML Output values in QTP - Tutorials and Examples
What are XML Output values in QTP?, Get the value from XML file and use it as input during run time is called as XML output value.
Publisher Name
Publisher Logo

Leave a Reply

Your email address will not be published. Required fields are marked *