How to retrive XML file data in QTP ? using Script(Chandana)
Answers were Sorted based on User's Feedback
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 ?||10 Yes||0 No|
Answer / sandipgami84
u can retrive data from database(XML fromet)..
u can use SQL..
LIKE e.g. Select * FROM TableName For XML Type, AUTO
Cell No: 09986645937
|Is This Answer Correct ?||6 Yes||0 No|
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
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|
Answer / nidhi jain
Chandan, below is solution
Const XMLDataFile = <your file path>
Set xmlDoc = CreateObject("Microsoft.XMLDOM")
xmlDoc.Async = False
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
I hope this will be helpful.
|Is This Answer Correct ?||8 Yes||5 No|
Answer / reddy
shilpa u can not understanding what is the requirement of
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|
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
|Is This Answer Correct ?||3 Yes||9 No|
can any one tell me the script to click on a button in the wintoolbar.
What does SPLIT and JOIN commands do in Vbscript?
which command u will use to access the application through descriptive programing?
How can we see the analog recording steps in QTP..the Steps are stored in a track file with an extension .dat..how can we open the file..
how to choose the framework in qtp ? 2)when we go for the descriptive programming ?
how i can get the value of label box , please any body tell me script of that code
how to merge object repositories?
What is clean sweep?
What is the extension for Recovery scenario?
the presentation layer of my application is built using VB 6.0 and a series of C++ dlls and components. We do not use Java, VB.Net, C## or any other component that can be decompiled. We are automating the application using HP Quick Test Professional. It is not reconginizing the combo boxes, tabs etc.... Could you please suggest, whether QTP supports C++ dlls and components or not...if yes, could you please guide me, how to overcome this situation. Can we install any special add-ins for this C++? .When we are performing the recording/execution, the application becomes very slow. Your quick response will be highly solicited in this regard.
what is description object?
Can any one say what exact diff between test->parameters, action properties-> parameters. after defining the parameters in test->settings, how can we access those parameters.(i know how to use action prop parameters)