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
What is Curd testing?
How many add-ins comes by default with quicktest professional?
can anyone tell me what to say in interview when interviewer asks about "tell me about your framework in your project"?
how to convert 100 into hundred repees only and viceversa
How to find the name of the machine where you are running your automation scripts in qtp?
What is smart identification in QTP?
What are the check points can be inserted without recording?
Hi all Can u give me the link where we can download full version of qtp my mail id is karthic.venkitapathi@gmail.com
What are the types of object repositories? Which one is you using?
Why do we use "Text checkpoint" If we can make use of it in "standard checkpoint" ?
Explain process of smart Identification in QTP?
in a web page hoe to check the dynamic links that rechabging with out using regular expressions
Explain the difference between data driven testing and parameterization ?
If u r using library files (Instead of Check Points) , How do u do bitmap check ?
How to do the scripting. Is there any inbuilt functions in qtp as in qtp-s. What's the difference between them? How to handle script issues?