clicking wrong Context menu item

Oct 12, 2011 at 8:54 AM

i am using white to test automate my windows appilcation

i have a scenario where in i will have to click on popup menu item.

The pop up menu is displayed when i right click a text. i have a menu item called "Set Default". 

click on the "Set default" menu item is done using below code

 window.PopupMenu("Set Default").Click();

 

Some time the instead of "Set default" another menu item called "Help" is getting clicked .

Please advise why is it happening. ?

Or am i doing any thing wrong??