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

Answers were Sorted based on User's Feedback



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

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

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

Answer / sravan

if we want to get all the objects with in a window then we
will use the child object method..add the window in the
object repository then it will select all the objects in the
window..then call a function with getroproperty method in it
to get all child objects one by one

Is This Answer Correct ?    1 Yes 4 No

Post New Answer

More QTP Interview Questions

hi, Can any body tell me whats the difference between the QTP and the Rational Robat ad the Silk Test and LOad Runner and are they used in any Company On the Major scale bcas I finnf Many comapny Using the Manual Testing Only Hence Askin the Question Hope I will get the Assitence .

1 Answers   First Europa,


do you prepared framework,pls answer this

1 Answers  


How to delete an object from the object repository?

0 Answers  


what is the framework followed by ur company in qtp

5 Answers  


hi all need one help . i want scroll down and up but thing the holl page is taking webtable. i need to scroll down and up using scroll tab any bodu knows plz help its urjent regards balaji

5 Answers  






What we are looking for is to load properties of object dynamically as for our application the global repository will pretty huge. It will be really helpful to us if something similar to following functions of Winrunner is available in QTP. #Define descriptor auto strDesc; #set property in the descriptor Gui_desc_set_attr(strDesc,?Class?,?Edit?); --- put other properties #Add Edit box to GUI Map Gui_add(? ?,strWindowName,strEditboxName,strDesc);

0 Answers  


Hi All, How to Compare two strings character by character in QTP

0 Answers  


I got an error "The"flightres" Dialog was not found in the Object Repository. Check the OR to confirm that the object exists or to find the correct name for the object." while running the following script Set flightres=description.Create() flightres("text").value="Login" flightres("Class Name").value="Dialog" Set agent = description.Create() agent("nativeclass").value="WinEdit" agent("attachedtext").value="Agent Name:" Set pwd = description.Create() pwd("nativeclass").value="WinEdit" pwd("attachedtext").value="Password" Set button = description.Create() button("nativeclass").value="WinButton" button("Text").value="OK" Dialog("flightres").WinEdit("agent").Set "test" Dialog("flightres").WinEdit("pwd").Set "mercury" Dialog("flightres").WinButton("button").Click Please let me know if i made any mistake in the above script...?

4 Answers  


Expalin Text/Text Area Checkpoint

1 Answers   Crea,


What is Port testing. Whhen will you perform?

0 Answers  


How can you give wait up to 10 seconds in qtp?

0 Answers  


What type of error u will get if u have not installed java add in in java project? what is the error name ?

1 Answers   Verizon,


Categories