Dynamically create Collection of Objects on Screen
Is there a function in WinRunner that can dynamically create a collection of the objects displayed on the screen? QuickTest Pro has the ChildObjects method which allows for such, but so far I have not been able to find a comparable function in WinRunner.
To better ellaborate what I am looking for I will explain how the ChildObjects method works in QuickTest Pro. By specifiying the parent object and child description, you can assign a collection of child objects that meet the child description to a variable.
Set OBJECTS = Browser("browser").Page("page").ChildObjects(DESCR IPTIONS)
Where OBJECTS is the variable the collection is assigned to, Browser("browser").Page("page") is the parent object (in this case a web page in a browser), and DESCRIPTIONS is a variable assigned by a previous descriptive programming statement which set it to an object type such as a LINK, BUTTON, DROP DOWN, etc.
If DESCRIPTIONS is a LINK, OBJECTS will contain a collection of all the LINKS on the web page.
I am looking for a similiar function in WinRunner. Does such a thing exist?
Re: Dynamically create Collection of Objects on Screen
[ QUOTE ]
You can iterate through a type of control with the location or index property and build your own hash/array of information.
[/ QUOTE ]
Is it possible to do this without a GUI Map, or with generic GUI Map entries? My goal is to generate a report of objects currently displayed on the screen, without having to specify the objects in the GUI Map.
I haven't been able to find anything that can help me in the forums so far, but I might not be searching by the right keywords.
Can either of you guys point me to an existing thread, or possibly provide a code example of the type of control you are describing, so that I can play around with it?