Esempio n. 1
0
 def __init__(self, driver):
   super(ProgramsModal, self).__init__(driver)
   # user input elements
   self.ui_description = base.Iframe(
       self._driver, self._locators.UI_DESCRIPTION)
   self.ui_notes = base.Iframe(self._driver, self._locators.UI_NOTES)
   self.ui_code = base.TextInputField(self._driver, self._locators.UI_CODE)
   self.ui_state = base.Dropdown(self._driver, self._locators.UI_STATE)
   self.ui_show_optional_fields = base.Toggle(
       self._driver, self._locators.BUTTON_SHOW_ALL_OPTIONAL_FIELDS)
   self.ui_primary_contact = base.TextFilterDropdown(
       self._driver, self._locators.UI_PRIMARY_CONTACT,
       self._locators.DROPDOWN_CONTACT)
   self.ui_secondary_contact = base.TextFilterDropdown(
       self._driver, self._locators.UI_SECONDARY_CONTACT,
       self._locators.DROPDOWN_CONTACT)
   self.ui_program_url = base.TextInputField(
       self._driver, self._locators.UI_PROGRAM_URL)
   self.ui_reference_url = base.TextInputField(
       self._driver, self._locators.UI_REFERENCE_URL)
   self.ui_effective_date = base.DatePicker(
       self._driver, self._locators.EFFECTIVE_DATE_DATEPICKER,
       self._locators.UI_EFFECTIVE_DATE)
   self.ui_stop_date = base.DatePicker(
       self._driver, self._locators.STOP_DATE_DATEPICKER,
       self._locators.UI_STOP_DATE)
   # static elements
   self.title = base.Label(self._driver, self._locators.TITLE)
   self.description = base.Label(self._driver, self._locators.DESCRIPTION)
   self.program_url = base.Label(self._driver, self._locators.PROGRAM_URL)
Esempio n. 2
0
 def _select_dest_obj_type(self, obj_name, is_asmts_generation=False):
     """Open dropdown and select element according to destination object name.
 If is_asmts_generation then TextFilterDropdown, else DropdownStatic.
 """
     obj_type_dropdown = base.DropdownStatic(
         self._driver, self._locators.OBJ_TYPE_DROPDOWN,
         self._locators.OBJ_TYPE_DROPDOWN_OPTIONS)
     obj_type_dropdown.select(obj_name)
     if is_asmts_generation:
         asmt_tmpl_dropdown = base.TextFilterDropdown(
             self._driver, self._locators.OBJ_TYPE_DROPDOWN,
             self._locators.OBJ_TYPE_DROPDOWN_OPTIONS)
         asmt_tmpl_dropdown.find_and_select_el_by_text(obj_name)
Esempio n. 3
0
 def select_asmt_tmpl(self, asmt_tmpl_title):
     """Select assessment template via dropdown according to the text title."""
     self.asmt_tmpl_element = base.TextFilterDropdown(
         self._driver, self._locators.SELECT_ASMT_TMPL_OPTIONS,
         self._locators.SELECT_ASMT_TMPL_DROPDOWN)
     self.asmt_tmpl_element.find_and_select_el_by_text(asmt_tmpl_title)