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 |
Can we test the Word Document using QTP Tool? We should test the page size,page set up, paragraph indentation and spacing, font size of the the character int the page.
can any one say that where we can download the QTP trail version ??????????
How to find the difference between 2 dates in qtp?
Hi all. Could anyone tell me the difference between an Action and a Function in QTP. Thanks in advance and Merry Christmas.
What is the use of text output value in quicktest professional?
Why we have to split actions in a test?
HOW TO DO THE BATCH TESTING USING QTP?
What are associated files in QTP?
What is a data driven test in qtp?
What is Regular Expressions?
What are the Features & Benefits of Quick Test Pro ?
How to call Datable values in the QTP program. exp: I have two parameters like Email id and Password this two i would like to add multiple entries in the datable to use it. What is the difference between Gobal/Action datatable