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 |
i need the word "good morning" to be displayed by default whenver we click upon the blank test while opening the qtp. Could you please answer...
How QA specialist can identify when programmatic descriptions are useful?
how you test broken link using the automated tool QTP ?
Which scripting language QTP is using?
can somebody send the script to write a multiplication table in notepad through qtp
What are the key points to create a framework in QTP for oracle forms?
A web Page has a webtable with four columns and four rows. The first column is of ID and has values of 100,100A,A100,100y Find out the number of rows whose ID starts with 100. Similarly the last column is 'number of links'. Each row in the last column has values like link1,link2,link3 etc Find out the number of links where id is 100
what are the limitations of automation testing?
How can I pass values from one action to another in QTP ?
What is All object and Local object in Object Repositary? Explain me please.
one screen page,that contains file , browse , update and cancel buttons.when we browse a file it should get update otherwise it should go to previous page.write negative test case for that.
How to retrieve the property of an object in QTP?