Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...



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

what is flag=0 in qtp tool.. i am strugglin to use flag function , exactly when it is used , any real time expert pls explain clearly?

1 Answers  


Local Obj Repository and SOR are editable know, y we have to edit those.. i mean in which situation we need to edit those and how to do..? pls help me..

2 Answers  


If we put all properties in mandatory and assistive list of Normal Identification, Do we still need Smart?

0 Answers  


in which case & which method we can use "native" property of an object ?

1 Answers  


Hi, I Would Like to Know which is the Best QTP Certification Training Institute in Hyd? Thanks in Advance kishan

1 Answers  






Diff b/n image n bitmap checkpoints?

2 Answers   iGate,


What is the difference between byref and byval in qtp?

0 Answers  


How we wil do data driven test using chkpts? Plz. give me complete navigation steps for this?

1 Answers  


How you are maintaining shared object repository in your team or your project?help me plz

1 Answers   CTS,


What is Cross browser testing? Does UFT support it?

0 Answers  


How to recognise the webelement and verifying that webelement is enabled?

0 Answers  


WHAT IS THE USE OF "FUNCTION GENERATOR" IN QTP?

9 Answers   CTS,






Categories