Popup Menu from right-clicking a tray icon
I am having trouble manipulating the pop-up window that appears when you right-click an icon in the windows tray.
1. First I tried simply recording.
This ended up with the following lines of code:
Tray.Syspager.Toolbar.Icon.PopupSelect (x, y, "menu_item1")
Tray.Syspager.Toolbar.Icon.PopupSelect (x, y, "menu_item2")
Tray.Syspager.Toolbar.Icon.PopupSelect (x, y, "menu_item3")
Tray.Syspager.Toolbar.Icon.PopupSelect (x, y, "menu_item4")
This code correctly displays the pop-up menu and will correctly click on menu_item1 consistently but after that it will fail at random. Sometimes it will correctly click all menu items. Sometimes it will fail and complain that a specific menu item cannot be found.
2. Then I tried implementing my own popupmenu class.
winclass MyPopupMenu : PopupMenu
Code for selecting then looks like this:
With this code SilkTest errors out on all menu items saying they cannot be found. So I tried to see what SilkTest was seeing in my popup menu.
correctly returns 5 (there are 5 items in this popup).
returns a blank list.
However, SilkTest DOES see the menu items as children of the popup menu since a call to:
returns a complete list of all 5 menu items.
I just can't figure out how to consistently select the items in the popup menu. If anyone has any ideas it would be very appreciated.
If there is any further information you think I should provide please let me know.
Thanks in advance.
P.S. A lot of what I have tried to solve this issue has come from searching this board already. I want to thank everyone who ever responded to a question about popup menus. Popup menus seem to be a very common roadblock for SilkTest users.