Esempio n. 1
0
    def does_menu_item_exist(self,
                             window_name,
                             object_name,
                             strict_hierarchy=False):
        """
         Check a menu item exist.

         @param window_name: Window name to look for, either full name,
         LDTP's name convention, or a Unix glob.

         @type window_name: string

         @param object_name: Object name to look for, either full name,
         LDTP's name convention, or a Unix glob. Or menu heirarchy

         @type object_name: string

         @param strict_hierarchy: Mandate menu hierarchy if set to True

         @type object_name: boolean

         @return: 1 on success.

         @rtype: integer
         """
        try:
            self._info("check menu item exist (%s-->%s)" %
                       (window_name, object_name))
            return ldtp.doesmenuitemexist(window_name, object_name,
                                          strict_hierarchy)
        except LdtpExecutionError as e:
            raise LdtpExecutionError(e.message)
Esempio n. 2
0
 def test_edit_paste(self):
     # paste may or may not be enabled depending on if something is in the clipboard
     # the only thing that can be checked for sure is if the menu exists
     edit_paste_exists = ldtp.doesmenuitemexist('frmAStyleWx', 'mnuEdit;mnuPaste')
     self.assertTrue(edit_paste_exists)
Esempio n. 3
0
 def test_edit_paste(self):
     # paste may or may not be enabled depending on if something is in the clipboard
     # the only thing that can be checked for sure is if the menu exists
     edit_paste_exists = ldtp.doesmenuitemexist('frmAStyleWx', 'mnuEdit;mnuPaste')
     self.assertTrue(edit_paste_exists)