def run(self): """Runs the installer.""" self._ensure(running=False) _LOGGER.info('Running %s', self.path) openApp(self.path) self.running = True self.installing = False self.anchor(WELCOME_WINDOW_TIMEOUT) _LOGGER.info('Installer window has appeared') self.page = self.welcome_page self.button_region = Region( self.getX(), self.getY() + self.getH() - BUTTON_REGION_HEIGHT, self.getW(), BUTTON_REGION_HEIGHT) self.buttons = Buttons(self.button_images, self.disabled_button_images, region=self.button_region) self.buttons.find_buttons() self.buttons_valid = True self.buttons.waitUntilButtonIsEnabled('next', NEXT_BUTTON_ENABLED_TIMEOUT) self.confirm_window_open = False self.confirm_window_region = Region( self.getX() + (self.getW() - CONFIRM_WINDOW_WIDTH) / 2, self.getY() + (self.getH() - CONFIRM_WINDOW_HEIGHT) / 2, CONFIRM_WINDOW_WIDTH, CONFIRM_WINDOW_HEIGHT) self.confirm_buttons = Buttons(self.confirm_button_images, region=self.confirm_window_region) _LOGGER.info('Waiting for Next button to be enabled') self.shortcut_checkboxes = None
def run(self): """Runs the installer.""" self._ensure(running = False) _LOGGER.info('Running %s', self.path) openApp(self.path) self.running = True self.installing = False self.anchor(WELCOME_WINDOW_TIMEOUT) _LOGGER.info('Installer window has appeared') self.page = self.welcome_page self.button_region = Region(self.getX(), self.getY() + self.getH() - BUTTON_REGION_HEIGHT, self.getW(), BUTTON_REGION_HEIGHT) self.buttons = Buttons(self.button_images, self.disabled_button_images, region = self.button_region) self.buttons.find_buttons() self.buttons_valid = True self.buttons.waitUntilButtonIsEnabled('next', NEXT_BUTTON_ENABLED_TIMEOUT) self.confirm_window_open = False self.confirm_window_region = Region( self.getX() + (self.getW() - CONFIRM_WINDOW_WIDTH) / 2, self.getY() + (self.getH() - CONFIRM_WINDOW_HEIGHT) / 2, CONFIRM_WINDOW_WIDTH, CONFIRM_WINDOW_HEIGHT) self.confirm_buttons = Buttons(self.confirm_button_images, region = self.confirm_window_region) _LOGGER.info('Waiting for Next button to be enabled') self.shortcut_checkboxes = None
def runApplication(executablepath, *args, **kwds): """Runs an application with the specified arguments. If the application is run without arguments, uses openApp to launch it. Otherwise, uses the Windows start command. """ if len(filter(lambda x: x is not None, args)) == 0: openApp(executablepath) else: startCommand(executablepath, *args, **kwds)
def openOutlook(): """Opens Outlook.""" openApp(getOutlookPath())