Example #1
0
 def _configure_shortcut(self, shortcut, add_shortcut):
     self._ensure(running=True)
     if self.page != self.shortcuts_page:
         raise Exception('installer is not on the Configure Shortcuts page')
     if self.shortcut_checkboxes is None:
         self.shortcut_checkboxes = VerticalCheckboxList(IMG_CHECKBOXES,
                                                         region=self)
         self.shortcut_checkboxes.find_elements()
         if self.shortcut_checkboxes.length() != 3:
             raise Exception('expected three checkboxes but found %d' %
                             self.shortcut_checkboxes.length())
     if bool(add_shortcut) != self.shortcut_checkboxes.is_checked(shortcut):
         if bool(add_shortcut):
             self.shortcut_checkboxes.check(shortcut)
         else:
             self.shortcut_checkboxes.uncheck(shortcut)
         sleep(1)