11-22-2010, 05:15 PM
Hi,
I am using the following code to highlight & name the childobjects of "calculator" (calc)in windows:
Thought the count of the childobjects is 31, for the last iteration the following error is displayed:
I have used the above code on other windows application like windows address book (wab). the result is the same.
However if I use a similar code on a Dialog box, there is no error displayed. Ex: Flight reservation dialog box
Please let me know as why is this happening.
Thanks,
Soumya
I am using the following code to highlight & name the childobjects of "calculator" (calc)in windows:
Code:
Set DescObj=Description.Create
Window("Calculator").Activate
Set childObject=Window("Calculator").Childobjects(DescObj)
msgbox childObject.count
For i=0 to childObject.count-1
childObject(i).highlight
msgbox childObject(i).GetROProperty("Class Name")
Next
Thought the count of the childobjects is 31, for the last iteration the following error is displayed:
Code:
General run error.
Line (10): "childObject(i).highlight".
I have used the above code on other windows application like windows address book (wab). the result is the same.
However if I use a similar code on a Dialog box, there is no error displayed. Ex: Flight reservation dialog box
Code:
Set DescObj=Description.Create
Dialog("Login").Activate
Set childObject=Dialog("Login").Childobjects(DescObj)
msgbox childObject.count
For i=0 to childObject.count-1
childObject(i).highlight
msgbox childObject(i).GetROProperty("Class Name")
Next
Please let me know as why is this happening.
Thanks,
Soumya