"Hi. I am using SilkTest 5.5. I am not able to automate test cases related
to context menu (which appears by right clicking), as neither I find any
builtin class for that nor I was able to write my own class/methods for
that. Can anybody please provide me any help on how to use Context menus in
SilkTest. Thanks in advance for any help/guidance."
Menu Items in popups are difficult only because you really can't record them and expect them to play back once objects move (PopupSelect requires xPos, yPos, sMenuItem as args)..., but they can be relatively easy to script. For example, if you have a listview (such as the Fonts window in the control panel), and you want Properties for Arial, you may get something like:
Fonts.FontList.PopupSelect(33,21,"Properties"). If you change the view to List or Small Icons, 33,21 may be Courier or some other font that occupies that position.
Create a new method to handle the moving object, and you should be set:
winclass ListView: ListView// extend ListView
void MyPopupSelect(ANYTYPE aItem, STRING sMenuItem)
RECT r = this.GetItemRect(aItem)
//gets position and size of item
INT x = r.xPos
INT y = r.yPos
this.PopupSelect (x, y, sMenuItem)