What is chaild object method?
When we will go for chaild object method?
How to use chaild object method?

Answer Posted / suresh kumar

Child object method Returns the collection of child objects
contained within the object.

Example for how to use This method

Public Function CheckObjectDesription(parent, descr)

Dim oDesc

' Create description object

Set oDesc = Description.Create()

arProps = Split(descr, ",")

For i = 0 To UBound(arProps)

arProp = Split(arProps(i), ":=")

If UBound(arProp) = 1 Then

PropName = Trim(arProp(0))

PropValue = arProp(1)

oDesc(PropName).Value = PropValue

End If

Next



' Get all child objects with the given description

Set children = parent.ChildObjects(oDesc)



If children.Count = 1 Then

CheckObjectDesription = "Object Unique"

ElseIf children.Count = 0 Then

CheckObjectDesription = "Object Not Found"

Else

CheckObjectDesription = "Object Not Unique"

End If

End Function

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is object spy in quicktest professional?

813


What are the properties you would use for identifying a browser and page when using descriptive programming?

801


1. What is the difference between Keyword and function in the keyword driven framework? 2. How do you associate Keywords to the script ?

1271


Explain actions in qtp ?

732


Print the Prime numbers in below format only up to 20(Need commas also) 1,2,3,5,7,9,11,13,17,19

1418


How to test background color and dynamic images during run time can you put the check point for moving objects?

1668


How can you handle exceptions in qtp?

756


I want two test two agents login for the flight website. Here is the scenario: I want to go through 1-3 rows for one user login and other user login I want to go though 3-5 rows. How would you set this up in qtp. Thank You

1719


In an interview, what r the general questions asked in QTP? pls give me anwser to this question?

1628


What are the advantages of Object Repository?

816


Why is action split used by qtp?

753


Hi All, How to get repeated word in string . Thanks Balaji

1133


How to find array size in qtp?

765


What are the features of quick test pro(qtp)?

722


Explain the check points in quicktest professional (qtp)?

773