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
images are dynamically changes how to compare two images with out using the bitmap
What is a programmatic description?
Can you write a script to check if the folder exists or not?
Should have experience in framework means?
What is the extension of the recovery scenario file in qtp?
How to use userdifined environment variables.Once we created in Environment tab which is at File--> Settings-- >Environment-->Userdifined
How can you pass value one action to another action?
What is different command used in command Prompt while using QTP?
Explain advantages and disadvantages of ddf?
Plz Explain AUTOMATION REFERENCE MODEL?
action contains public and private functions but do we resuable that action or not..If it is reusable How..plz tell me the ans
How do you check ticket cost and ticket number in flight application?
Is there any relation between Keyword Driven Framework and Recording modes provided in QTP( whether Recording modes are applied on keyword driven framework or not?)
Can we write winrunner language i.e TSL in QTP tool?
What is the difference between local and shared object repository in qtp?