How can we test an XML using QTP?
I have been to an interview, where they have given me an
XML which had 15 values and they have given those values on
a separate page. They asked me to write a QTP script to
check the XML is having those particular 15 values.
Answer Posted / jitendra
Hello All,
My understanding is that the value stored in an XML file
interms of "Tag" and "Value". A particular value is
assigned to a particular tag.
Ex:
<Environment>
<Variable>
<Name>servername</Name>
<Value>10.22.33.22</Value>
</Variable>
</Environment>
If this XML format is like this then we can write script :
Environment.LoadFromFile("c:\data.xml")
dataToCompare = Environment.Value("servername")
Now we can compare the above value with the required data
in your separate page.
Note:The above solution is also perfect. In my solution the
constraint is that (you have to know the name of all 15
tags)
Make me clear if i am wrong!!
| Is This Answer Correct ? | 1 Yes | 4 No |
Post New Answer View All Answers
How many types of parameters are available in quicktest professional?
Tell me about your project? please help me how to tell about insurance project
Brief the process of testing with UFT?
can anyone tell me from where i can download qtp demo or crack version
Which features or drawbacks of QTP lead to the upgrade for a newer version?
What is the extension of the qtp local repository?
How do I get the QTP scripts result in xml format by using vb script function?
wht type of User defined functions or Java Releated functions Do we write in VB scripting
How you can find length of array in qtp?
How to execute the WR Script through QTP? I have WinRunner script with initialization script, common scripts, GUI AND functions. I connected WR through QTP with "call to WinRunner" option but I am getting problem after connecting to WinRunner i.e. showing "Do you want to quit now" with 'yes' and 'No' message box
How to explain a banking project in interview as a test engineer???
Can launch two instances of qtp on the same machine?
What is the difference between run time object and test object?
What is a recovery scenario?
What is difference between run time object and test object?