Beispiel #1
0
    def remap(self, window_name):
        """
        We can handle dynamically created widgets(meaning widgets created at run time) using this remap function.
        Calling remap will generate appmap for the given dialog at run time and update the hash table.
        Then we can access the new widgets. But please make sure to call undoremap() once the required functions are
        performed so that the hash table will be reverted back to its original state. The reason for having undoremap()
        is that subsequent calls to remap() might corrupt the hash table containg the appmap entries.

        Please not that the <application-name> should be same as the one given as the commmand-line argument
         for appmap generation.

        :param window_name: 窗口名称

        :return:

        """
        try:
            self._info('remap (%s)' % window_name)
            return ldtp.remap(window_name)
        except LdtpExecutionError as e:
            self._debug(e.message)
            raise LdtpExecutionError('remap failed.')
Beispiel #2
0
def remap(frm):
  ldtp.wait(1) # sometimes (only for newer versions?) ldtp needs a second to catch its breath
  ldtp.remap(frm) # in case this is second time we've run it
Beispiel #3
0
 def remap(self):
     """
     It reloads the application map for the given ooldtp.context.
     """
     ldtp.remap(self.name)
Beispiel #4
0
 def remap(self):
     """
     It reloads the application map for the given ooldtp.context.
     """
     ldtp.remap(self.name)