def _generate(self, *args):
     path = util.getMenuPathString(self.widget)
     if util.belongsMenubar(self.widget):
         runKeyword("selectFromMenuAndWait", path)
     else:    
         self.selectFromPopupMenu()
 def _generate(self, *args):
     path = util.getMenuPathString(self.widget)
     swinglib.runKeyword("selectFromMenuAndWait", [ path ])