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.
Answers were Sorted based on User's Feedback
Answer / mats
You can test xml using xml nodes.
First you need to create xml object.
Set xmlobj=Createobject("Microsoft.xmldom")
Once the object is created you need to know how many nodes
are there in xml file.
Accordingly we need to specify the xml node path and
retrieve the values.
Is This Answer Correct ? | 4 Yes | 0 No |
Answer / 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 |
What are the recording modes and executing modes avialble in QTP?
hi gavasker i want how to merg OR's in QTP 8.2 by QTP Plus
In what occasion we can specify global sheet and action sheet?
For QTP Test Engineer, What is his contribution to the Project? Means, As as automation test engineer what is his role in the current project?
Why you are Using Descriptive programming instead of Object Repository?
i need the licence key for QTP V9.5 can anyone help me on getting this?
what r advance features u had done in QTP?
What is keyword view?
what difference between client and server applications exatly?
Why do we use breakpoints in QTP?
The xls contain data. how to get number of columns form the sheet?
Actually what is Quality center..is it Test Director or some other tool..Anybody can expalain it in detail..Thanks in advance..