Exemple #1
0
 def _close(self, button_id=None):
     """Closes the actual confirmation dialogue represented by this
        instance.
     """
     if button_id is None:
         DialogueWindow._close(self, button_id)
         return
     if button_id not in self.button_ids:
         raise Exception("confirm dialogue '%s' does not contain a button with id %s" % (self.name, button_id))
     if self.keys is not None:
         SCREEN.type(self.keys[button_id])
         sleep(1)
     else:
         button = self.buttons[button_id]
         if isinstance(button, list):
             clickAny(button)
         else:
             SCREEN.click(button)
         sleep(1)
Exemple #2
0
 def _close(self, button_id = None):
     """Closes the actual confirmation dialogue represented by this
        instance.
     """
     if button_id is None:
         DialogueWindow._close(self, button_id)
         return
     if button_id not in self.button_ids:
         raise Exception("confirm dialogue '%s' does not contain a button with id %s" %
                 (self.name, button_id))
     if self.keys is not None:
         SCREEN.type(self.keys[button_id])
         sleep(1)
     else:
         button = self.buttons[button_id]
         if isinstance(button, list):
             clickAny(button)
         else:
             SCREEN.click(button)
         sleep(1)
Exemple #3
0
 def click(self, name):
     """Clicks the specified button.
     """
     i, match = self._button_matches[name]
     _LOGGER.info("%sclick '%s': %s", self._debugprefix, name, str(match))
     SCREEN.click(match, NO_MODIFIER)
Exemple #4
0
 def click(self, name):
     """Clicks the specified button.
     """
     i, match = self._button_matches[name]
     _LOGGER.info("%sclick '%s': %s", self._debugprefix, name, str(match))
     SCREEN.click(match, NO_MODIFIER)
Exemple #5
0
 def close(self):
     """Clicks on the close button in this window's title bar."""
     _LOGGER.debug('close window: %s', self.title)
     SCREEN.click(self.close_button)
Exemple #6
0
 def maximize(self):
     """Clicks on the maximize button in this window's title bar."""
     _LOGGER.debug('maximize window: %s', self.title)
     SCREEN.click(self.maximize_button)
Exemple #7
0
 def setFocus(self):
     """Clicks on the center of this window's title bar."""
     _LOGGER.debug('setFocus: %s', self.title)
     SCREEN.click(self.titlebar_region)
Exemple #8
0
 def close(self):
     """Clicks on the close button in this window's title bar."""
     _LOGGER.debug('close window: %s', self.title)
     SCREEN.click(self.close_button)
Exemple #9
0
 def maximize(self):
     """Clicks on the maximize button in this window's title bar."""
     _LOGGER.debug('maximize window: %s', self.title)
     SCREEN.click(self.maximize_button)
Exemple #10
0
 def setFocus(self):
     """Clicks on the center of this window's title bar."""
     _LOGGER.debug('setFocus: %s', self.title)
     SCREEN.click(self.titlebar_region)