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 software testing metrics
How we can we create a Text checkpoint in QTP 9.1,Actually what i did is first i put in recording mode and gofor Inser menu>Checkpoint>Textcheckpoint>click,Now an hand symbol came and i showed it to some textbox and cliked but the QTP9.1 is giving an error message like "The Obkect you are selecting doesn't support this operation" If i go for Help of QTP 9.1 information I didn't get any solution,pls help me in this issue.
What is Tree view?
Please explain me frameworks & how to generate the scripts in framework
explian about the qtp frame work? where u can use it in your project?
How to make "TEST Batches" in manual testing . How it is possible plz explin in detail?
1. how can you handle exceptions without using recovery scenario?
Hi All, I need Code For how to export Pass\Fail status to excell sheet without using QC. Thanks Balaji
what r the drawbacks and limitations of QTP?
In QTP while testing 3 tier application, It is Java Based Application developed using Java, servelets and JDBC etc... and It is a Web based Application.. which Add-In do we need to select while testing ...Java or Web Add-In
How to do the scripting. Are there any inbuilt functions in QTP? What is the difference between them? How to handle script issues?
What is keyword driven framework, what is "key" in It.