Forum Discussion

vinay_ba92's avatar
vinay_ba92
Occasional Contributor
8 years ago

How to work with StripPopupMenu using TC?

I have a panel which contains objects but TC is not identifying the objects inside the panel .i have to rightclick on the object inside the panel ,popup up appears which contains 1.Add a lesion .

After adding the lesion i have to delete the lesion by right clicking on the same.

when i record through TC ,below is the code it generated.

 

Aliases.CareSys.frmMain.MdiClient.ClientCareEdit.pnlTabs.tabControlContainer.tabCare.pnltabCare.tabContainerCare.tabCareDelivery.pnltabCareDelivery.tabCareDeliverySubTab.tabBodyMap.pnltabBodyMap.BodyMapEdit1.pnlMain.spMain.SplitterPanel.pnlBm.BodyMap.ClickR(410, 74);
// NameMapping.Item.StripPopupMenu.Click("Add lesion");

// Aliases.CareSys.frmMain.MdiClient.ClientCareEdit.pnlTabs.tabControlContainer.tabCare.pnltabCare.tabContainerCare.tabCareDelivery.pnltabCareDelivery.tabCareDeliverySubTab.tabBodyMap.pnltabBodyMap.BodyMapEdit1.pnlMain.spMain.SplitterPanel.pnlBm.BodyMap.ClickR(408, 75);
// NameMapping.Item.StripPopupMenu.Click("Delete lesion");

 

 

Object spy:

Sys.Process("CareSys").WinFormsObject("frmMain").WinFormsObject("MdiClient", "").WinFormsObject("ClientCareEdit").WinFormsObject("pnlTabs").WinFormsObject("tabControlContainer").WinFormsObject("tabCare").WinFormsObject("pnltabCare").WinFormsObject("tabContainerCare").WinFormsObject("tabCareDelivery").WinFormsObject("pnltabCareDelivery").WinFormsObject("tabCareDeliverySubTab").WinFormsObject("tabBodyMap").WinFormsObject("pnltabBodyMap").WinFormsObject("BodyMapEdit1").WinFormsObject("pnlMain").WinFormsObject("spMain").WinFormsObject("SplitterPanel", "", 1).WinFormsObject("pnlBm").WinFormsObject("BodyMap");

 

 

please help me on the same .

when i use strippopupmenu, its not showing any methods

  • vinay_ba92

     

    StripPopupMenu can have objects which can be traversed, or sometimes the "Pop-up Menu" is displayed outside the application hierarchy which can be handled and can perform click operation by descriptive programming as follows

     

     

     

    Set objPopupMenu = Aliases.ApplicationWindow("xyz").StipPopupMenu
    Call ojPopupMenu.ClickItem("RequiredItem")

     

    or

     

     

    PropsArray = Array("ObjectType", "VisibleOnScreen") 
    'these can be a set of relevant properties which are needed to identify the object ValuesArray = Array("Popup", TRUE)
    'Associated Property Values to identify the correct object Set objPopupMenu = Sys.ApplicationWindow("xyz").FindChild(PropsArray, ValuesArray, 50, TRUE) Call ojPopupMenu.ClickItem("RequiredItem")

    -Rajesh V V