How to count the no of objects in XML file(QTP)
Answer / uday kumar_anem
' To find the number of child elements for a specified
parent
Set doc = XMLUtil.CreateXML()
doc.LoadFile "e:\sample.xml"
Set elementCol = doc.ChildElementsByPath
("/Environment/Variable")
temp=elementCol.Count
msgbox(temp)
'To Find the numer of child elements for a root
Set doc=XMLUtil.CreateXML()
doc.loadfile "e:\sample.xml"
Set root = doc.GetRootElement()
temp=root.ChildElements().count
msgbox(temp)
My sample XML file is like:
<Environment>
<Variable>
<Name>Name</Name>
<Value>Uday Kumar</Value>
</Variable>
<Variable>
<Name>Designation</Name>
<Value>Senior Software Engineer</Value>
</Variable>
</Environment>
| Is This Answer Correct ? | 10 Yes | 2 No |
from where we will retrieve data for data driven tests in qtp?
How will you check that your test cases covered all the requirements?
Excel sheet having some datas and some datas present in the application (in table). How will you compare these two datas? Write code to fetch datas from Excel sheet.
how can we compare descriptive programing with a regular expression
Can you tell me the differences between writing the VB script manually for a application and recording the same application in QTP , with a example?
Extract a word from a sentenece?
Explain building blocks of the bpt framework ?
What is qtpro?
what is error and fault in terms of software quality?
Does QTP record on Objects created on XWindows Environment?
what r the 3 basic factor on which we determine to perform automation
what are the attributes of QTP?