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 / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Brief the process of testing with UFT?

635


can i change the runtime properties of an object ? How can i check if a parameter exists in database ?

1415


What does mean by Scope of Automation?n How we defined it?

1578


How to suppress warnings from the test results page?

604


Consider one application is open, clicking one menu will open another application in another browser. QTP does not catch the URL of the second browser(second application). can we capture it ?

1472






Explain types of descriptive programming?

591


What r the different filters in defect in quality center

3285


what difference between runtime object and text object and what property they have. whether they have same properties or different properties.

1709


Some time when i wanna learn the object i face issue like i am not able learn the object in proper manner... eg:for text bo on web page it should learn as webedit but some times it reads as winobject:internetexpoler-server, because of this i have to uninstall the qtp and re-install it again when i do this it reads the object perfectly.....plz suggest the soln

1395


supose i hv to acsess some functionlaties of a test in 1 machin , some part other machin how can acsess?

1360


I need to obtain the parent of an object programatically, so if I have: winButton("aButton") I need to obtain the parent part: window("Window1").Dialog("Dialog1") so I can programatically create a string of the full name of the object to call it with an execute statement in QTP I would like to use something like: part[1] = "window(""Window1"")" part[2] = "dialog(""Dialog1"")" so I can do: exeLine = part[1]&"."&part[2]&"."&"winButton(""aButton"")" Execute exeLine Apart from keeping a record of the window/dialog hierarchy is there a parent or path function/ command Thanks Adrian

1574


If I change the property value at runtime is it effect is object repository?

609


How to find a window is minimized or not

1446


can i compare two databases using QTP ?

1884


How to use transactions in qtp?

564