Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Childobject of a window
#1
Not Solved
Hi,

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
Reply


Messages In This Thread
Childobject of a window - by soumyas - 11-22-2010, 05:15 PM
RE: Childobject of a window - by cbeggs - 11-22-2010, 08:30 PM
RE: Childobject of a window - by soumyas - 11-23-2010, 03:44 PM
RE: Childobject of a window - by cdesserich - 11-24-2010, 09:43 PM
RE: Childobject of a window - by Anu123 - 11-24-2010, 10:23 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Is it possible to call Java window and Power Builder Window in 1 Action sbkhbk 0 2,451 06-05-2014, 08:18 PM
Last Post: sbkhbk
  QTP 11.0 and IE8 issue - ChildObject Ankesh 4 4,729 03-18-2014, 09:19 PM
Last Post: raghav619
  qtp 11 not recording window within a window kp_usa 0 2,288 12-19-2012, 10:52 PM
Last Post: kp_usa
  QTP Opens a popup window but won't recognize the buttons in the window Blaster0007 4 7,671 07-20-2012, 12:03 AM
Last Post: sree.85

Forum Jump:


Users browsing this thread: 1 Guest(s)