Forum Discussion

srini_g_vasan's avatar
srini_g_vasan
Occasional Contributor
10 years ago

How to Click on Menu items from SyncFusion Grid

Hello,



We have a Synfusion Menu Grid of Syncfusion.Windows.Forms.Tools.XPMenus.MenuGrid type in our application. How can i click on particular Menu item in this Grid. I tried with



Aliases.MenuGridHost.MenuGrid.ClickItem("MenuName") --- there were no ClickItem method in the class.



I tried adding  Aliases.UBS_Ruby_AppHost.MenuGridHost.MenuGrid in ObjectMapping options-->



Could you please help







Regards,

Srini

4 Replies

  • srini_g_vasan's avatar
    srini_g_vasan
    Occasional Contributor
    Any help pls...



    Not able to spy the menu object as well using Testcomplete point and fix



  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)
    Hi Srini,

     


    To the Object Mapping window, you need to add the class name of your control (Syncfusion.Windows.Forms.Tools.XPMenus.MenuGrid), but not the mapped name used in TestComplete (Aliases.UBS_Ruby_AppHost.MenuGridHost.MenuGrid).


     


    Also, you can test the control by using native methods and properties of the control. Syncfusion provides rich set of them. Refer to the control's documentation to learn the ones you need to use.


     

  • You may need to possibly re-map the control. or even map the children of the control.



    You would use the Object Browser find the control, and either map the parent as a separate item then map the children under that item or even re-map the entire process tree's children. This may also help with full object recognition. Because sometimes some of these controls are recognized as window classes when they are menus,  menu items or sub menus.
  • srini_g_vasan's avatar
    srini_g_vasan
    Occasional Contributor


    Thanks for the suggestions.. I found a property called 'parentItem' in menuGrid object that has the list of bar items.  After identifying the barItem invoked a native method 'performClick' to simulate click action.