Forum Discussion

DenisMedvedev's avatar
DenisMedvedev
Contributor
9 years ago

How to deal with SwingPopupMenu ?

I have bellow code

    obj.ClickR()
    obj.SwingPopupMenu.Click("PopupMenuName") 

It does not work in some cases, e.g. if i have two tabs

Do we have other options how to work with right click menu?

 

Thanks,

Denis

1 Reply

  • hogueybear's avatar
    hogueybear
    Occasional Contributor

    I'm not sure exactly what you are asking here, but here are a couple of ways you can deal with SwingPopupMenu's, that should help get you started.

     

    Assume

    menu = someObj.SwingPopupMenu;

     

    Then you can get the number of items in the menu

    menu.count;

     

    And you can traverse the menu

    for (i = 0; i < menu.count; i++)  {
       Log.Message("Menu choice - " + menu.items(i).Caption);
    }