how to get childobject from .net application. i tried but
its showing child object count zero. but window has child
objects.the following script i written... pls help me how to
get.


set parent=SwfWindow("winodw name")
CheckObjectDescription parent, SwfButton

Public Function CheckObjectDescription(parent, oDesc)
Set oDesc = Description.Create()
oDesc("micClass:").Value ="Swfbutton"
Set children = parent.ChildObjects(oDesc)
cntObj=children.count
msgbox(cntObj)
End function

Answer Posted / nanda

Hi Check this code...

set parent=SwfWindow("winodw name")
CheckObjectDescription parent, SwfButton

Public Function CheckObjectDescription(parent, oDesc)
Set oDesc = Description.Create()
oDesc("mercury class").Value ="Swfbutton"
Set children = parent.ChildObjects(oDesc)
cntObj=children.count
msgbox(cntObj)
End function

instead of above use this..

set odesc = description.create
odesc("Class Name").Value = "SwfButton"
set childobj = window("<Window name>").childobjects(odesc)
k = childobj.count
msgbox k




Let me know the feedback -----------
nanda.dreddy@gmail.com

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which scripting language used by quicktest professional (qtp)?

666


If I change the object name in one action will it be updated in all the actions? Or not?

604


Hi we are running tests remotely from quality center and pushing tests into qtp boxes remotely, and it does execution but while uploading results back into quality center it hangs in qtp box.If any one come across similar problem, please send me details how to handle this. Thanks kris

1750


Object repositories types, which and when to use?

581


Get the count of files of similar types from a folder.

975






Hi any body pls help me for QTP 11.0 software free demo version. i have to practice. Kindly send the link.or where i have to download.

1701


How does qtp identify objects in the application?

587


what is the latest version of QTP? Main difference between 9.2 and 10 version

1554


how do i know how to use tools

1455


How to delete an object from the object repository?

595


I am facing an issue of object identification with the dropdown element of DHTML grid. When I tried to recognize these different dropdown objects, QTP identifies only one object for all the dropdowns. Hence, selection of different data from different dropdowns list is an issue. To overcome this problem, i have used Descriptive Programming technique by creating different object descriptions which have all the other properties same but differ only in one property i.e. ‘X’ location of the element on the screen. Hence, i have created distinct object descriptions that would allow us to select values in different dropdowns. The code is given below. But still I am unable to identify distinct dropdown objects. ‘Object Description for Dropdown Cell Status Set objCellStatus = Description.Create objCellStatus("micclass").value = "WebList" objCellStatus("name").value = "select" objCellStatus("x").value = 219 ------ ‘X’ Axis value for cell status drop down ‘Object Description for Dropdown Sub Segment Set objSubSegment = Description.Create objSubSegment("micclass").value = "WebList" objSubSegment("name").value = "select" objSubSegment("x").value = "319" ------ ‘X’ Axis value for sub segment drop down Please help... This is specific to DTML grid(Drop down object)

1414


What are the factors on which script execution time is dependent?

615


What is difference between run time object and test object?

558


Can an action have 2 shared object repositories associated with them? In that case, if two of them contain the same object, which one will be considered?

591


Hi frens! I am testing VB project with MS Access database. At add button click my record is storing in data table and it is shown in datagrid. So at Delete button click i want to check datagrid rows 9before and after delete). so how can i do it using descriptive programming?

1475