How to retrive XML file data in QTP ? using Script(Chandana)

Answers were Sorted based on User's Feedback



How to retrive XML file data in QTP ? using Script(Chandana)..

Answer / kr

In QTP9.0 it supports XML input data.here also same as in
QTP8.2 we can import .xml files into user defined
Environment Variable section.

Is This Answer Correct ?    11 Yes 0 No

How to retrive XML file data in QTP ? using Script(Chandana)..

Answer / sandipgami84

Hi Chandana,

u can retrive data from database(XML fromet)..

u can use SQL..
LIKE e.g. Select * FROM TableName For XML Type, AUTO

Sandip
Cell No: 09986645937

Is This Answer Correct ?    6 Yes 0 No

How to retrive XML file data in QTP ? using Script(Chandana)..

Answer / nidhi jain

Chandan, below is solution

Const XMLDataFile = <your file path>

Set xmlDoc = CreateObject("Microsoft.XMLDOM")
xmlDoc.Async = False
xmlDoc.Load(XMLDataFile)

Set nodes = xmlDoc.SelectNodes(<provide you node hierarchy>)
MsgBox "Total books: " & nodes.Length

Set nodes = xmlDoc.SelectNodes("<node hierarchy>/text()")

' get their values
For i = 0 To (nodes.Length - 1)
Title = nodes(i).NodeValue
MsgBox "Title #" & (i + 1) & ": " & Title
Next


I hope this will be helpful.

Is This Answer Correct ?    9 Yes 5 No

How to retrive XML file data in QTP ? using Script(Chandana)..

Answer / fayaz

We can load environment variables from an xml file.

File --> Settings and click the "Environment" tab

You can see a check box "Load environment variables "

check it and give the path of the xml file.

when u run QTP , the variables in XML file will be
available.
And you can retrieve those values using Environment.value
("variable_name") from any actions.


Hope this will answer your question

Is This Answer Correct ?    7 Yes 4 No

How to retrive XML file data in QTP ? using Script(Chandana)..

Answer / reddy

shilpa u can not understanding what is the requirement of
chandana.
what she asking is how to retrieve xml file data using
script in qtp

ex: u have data in datatable that all the will be retrive
in xml format using script

Is This Answer Correct ?    3 Yes 1 No

How to retrive XML file data in QTP ? using Script(Chandana)..

Answer / shilpa reddy

chandana,we cannot apply xml data directly to script,first
we should import data into runtime datatable using import
sheet/import methods.using datatable methods we can apply
this values in our required location in the script.I
provided script for this in further answers,check it out
once.

Is This Answer Correct ?    4 Yes 9 No

Post New Answer

More QTP Interview Questions

I want to see all the properties of agent name in login window. I will use the script Set a=Window("FR").WinEdit("Agent Name:").Gettoproperties( ) msgbox but my question is how to use the msgbox if i use a it will display only a, so anyone pls let me know how to get the display of all the properties using GetToProperties () or GetRoProperties (). Thanks a lot

5 Answers  


How to access values from Unix OS and how to write..

1 Answers  


How to connect the real time application application with the QTP?

2 Answers  


I want to do Certification course in QTP. For this I request you to suggest the best Tutorial in PDF format, and also tell me the best institute and the estimate cost for joining the institute ib delhi NCR. Hence, if possible, kinldy mail PDF file to my mail-ID: kumar123.pathak@gmail.com , Regards, kumar pathak

0 Answers  


What is quicktest professional window?

0 Answers  


How to handle the errors without using recovery scenery?

3 Answers  


What is test harness?

2 Answers  


Hi guys can any plz help me how to send fax in sample Flight Appication

1 Answers  


hi i have one doubt is there any companies are taking correspandence courses plz leme know urjent

2 Answers  


1.can we parameterise object repository?how we can do it? 2.there is a name "mallikharjun".i want to get the vowels in it through VBSCRIPT?

3 Answers   Tech Mahindra,


When using descriptive programming?

0 Answers  


how do close the task manager through QTP?

2 Answers  


Categories