Forum Discussion

Raghukatta's avatar
Raghukatta
Contributor
8 years ago

How to get control names or control ids of Objects in WinTool bar

Hi,

 

I am trying to automate a desktop application which is there in multiple languages.I need to click on Add button in a Tool Bar.I don't want to use Name as it will be different in different languages. When I am trying to spy the Add Button object ,test complete is able to identify till Tool bar.Inside the tool bar there are Win Buttons.How can I get Properties like Control name or Control ids of Add Button.Please find the attachment for screenshot and test complete Object spy details.

 

Thanks in Advance.

 

6 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    What methods are available on the Toolbar? Is there something like a ClickItem or something like that?  That would be my first suggestion because, in my experience, the ClickItem can be run on either the name OR the ID.

    • Raghukatta's avatar
      Raghukatta
      Contributor

      Thanks for your replay.There is a method for ClickItem but how can I get an Id of winbutton inside the Tool bar when Test complete is identifying up to tool bar.

      • tristaanogre's avatar
        tristaanogre
        Esteemed Contributor

        There are very few situations where I would recommend recording a test but this is one of them. It might be useful to do a quick record of the task you want to achieve and then, from that recording, pull out the specific information to use in your test.