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|
What issues come up in test automation, and how do you manage them?
How u execute test cases in manual testing?
When I used random numbers(1 to 9) with regular expression and run the test, it runs only 5 iterations with passed result instead of running all 1 to 9. Please tell me what can be the reason
Hi, I Need code to click the webbutton inside of webtable. I need to click a particular 'Edit' webbutton inside of webtable. For Example... Having 5 Rows and 10 Columns. 'Edit' webbutton are placed in 10th Column. I need to click the 3rd row 'Edit' button with unique value. Browser("....").Page("...").Frame("...").WebButton("btn_Edit ") I Tried with below code: Set objButton = Browser("...").Page("...").Frame("...").WebTable("...").Chil dItem(3,10, Webbutton,0).Click - Not working this code :( Anyone can help me to sort out this simple issue ???
There is a very good institute for Automation Testing using QTP.For more details please visit jbslearnings.com.
Can we directly automate testscripts accrdoing to requirements
Explain about Checking Bitmaps?
what is defination of intergration testing?
What is throw object?
In one of the scripts the pwd in the DT was encripted. Can any one tell me how to I decript or undo the same?
how do you remove object repository at runtime and load object repository and verify it
the build is develeped in Java. is possible to write scripting in vb using QTP ?