| || |
Getting opened child windows
I have a Desktop application which has many child windows in it. When I was writing scripts,i came to a situation where i have to check for any child windows are opened or not. If opened then close those child windows.
How do I get the list of opened child windows ?
Thanks in adance
Re: Getting opened child windows
Use "ChildObjects" method to get the list of Child Windows opened. Here is an example taken from QTP Help.
</font><blockquote><font size="1" face="Verdana, Arial, Helvetica">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;"> Build a Description object
Set desc = Description.Create()
' set some selective properties
' Collect all enabled child objects of type list
Set Lists = JavaWindow("SwingSet".ChildObjects(desc)
' Iterate on all list objects and reset them to their first item
For i=0 to Lists.Count-1
Next </pre><hr /></blockquote><font size="2" face="Verdana, Arial, Helvetica">This example will help you to get your job done.