Forum Discussion

idriskhan's avatar
idriskhan
Occasional Contributor
13 years ago

How to Use GUI Spy on a Appliction menu item

Hi,

Please can someone tell me how I can get the Object Spy to look at my menu options. On our application I select File and I see the sub menus, I want Object Spy to tell me what these menu items are.



When i use Object Spy,

I select the menu  "File" this opens and shows all sub menus, I go to Object Spy and press the the icon, but when i do this my menu "File" closes.



Can I use the Object Spy to identify the menu's sub menus? If so how?



Thanks

  • ilim's avatar
    ilim
    New Contributor
    You can do this by using the second "Point and fix" option in Object Spy dialog. Once you click the "Point and fix" option, object spy will highlight any object you move your mouse over. You can the click on the menu and move the mouse over the menu item. You may need to wait awhile but eventually, the menu item will highlight with a red boundary. At this point click the (Shift+Cntrl+A) key combination. This will bring up the properties and methods for the menu item in the Object Spy dialog. 



    Hope this helps



    Ian
  • idriskhan's avatar
    idriskhan
    Occasional Contributor
    Thanks for th Reply.



    What I am seeing is the group of menu items is highlighted in red, I select a menu item but when selecting the menu item I do not see the red border around this.

    During Playback time my action of selecting the menu item is not done and the test fails.

  • vajindarladdad's avatar
    vajindarladdad
    Frequent Contributor
    Hi,

    When you don't see red border around the object that's the clear indication that , you can not map that object directly but you can access it.



    To access that particular object you need to write a code and select specific menu item.

    I thinl "wItem"will help you to dig it in till you reach the specific item.



    Also, I have seen the image , there are some shortcut keys (Hot keys)Available. you can use "keys" function and select the specific menu item.



    I hope this has been of some help.



  • idriskhan's avatar
    idriskhan
    Occasional Contributor
    Hi,

    Thanks for the reply, yes using the short cut keys works but I would like to be able to access the menu options directly.



    I cannot find any wItem property for any of my objects.

  • vajindarladdad's avatar
    vajindarladdad
    Frequent Contributor
    Hi,

    my bad ... please try to find any propertly using "item" in the "search" box  from "Object Name mapping" window.



    I don't have test complete installed here , othewise I could have sent you the exact properly / method to use.