示例#1
0
 def _tabs(self):
   """Dict of Assessment's Tab objects."""
   selenium_utils.scroll_into_view(self._driver, self.container_element)
   return {
       self._elements.RELATED_ASMTS_TAB: AssessmentRelatedAsmtsTable,
       self._elements.RELATED_ISSUES_TAB: AssessmentRelatedIssuesTable,
       self._elements.CHANGE_LOG_TAB: self._log_tab_validate}
示例#2
0
 def _tabs(self):
   """Dict of Assessment's Tab objects."""
   selenium_utils.scroll_into_view(self._driver, self.container_element)
   return {
       self._elements.RELATED_ASMTS_TAB: AssessmentRelatedAsmtsTable,
       self._elements.RELATED_ISSUES_TAB: AssessmentRelatedIssuesTable,
       self._elements.CHANGE_LOG_TAB: self._log_tab_validate}
示例#3
0
 def active_tab(self, tab_name):
   """Set active tab according to passed 'tab_name'. If passed 'tab_name'
   equal current active_tab do nothing.
   """
   if tab_name != self.active_tab.text:
     self._active_tab = self.get_item(tab_name)
     selenium_utils.scroll_into_view(self._driver, self._active_tab.element)
     self._active_tab.click()
示例#4
0
 def open_add_new_ca_modal(self):
   """Open Add Attribute modal and return Custom Attribute Modal."""
   selenium_utils.wait_until_stops_moving(self.add_btn.element)
   selenium_utils.scroll_into_view(self._driver, self.item_el)
   selenium_utils.get_when_clickable(self._driver, self._locators.ADD_BTN_CSS)
   selenium_utils.wait_until_not_present(
       self._driver, self._locators.TREE_SPINNER_CSS)
   self.add_btn.click()
   return CustomAttributeModal(self._driver)
示例#5
0
 def open_add_new_ca_modal(self):
     """Open Add Attribute modal and return CustomAttributeModal PageObject."""
     selenium_utils.wait_until_stops_moving(self.button_add.element)
     selenium_utils.scroll_into_view(self._driver, self.button_add.element)
     selenium_utils.get_when_clickable(self._driver, self._locator.ADD_BTN)
     selenium_utils.get_when_invisible(self._driver,
                                       self._locator.TREE_SPINNER)
     self.button_add.click()
     return CustomAttributeModal(self._driver)
示例#6
0
 def open_add_new_ca_modal(self):
   """Open Add Attribute modal and return Custom Attribute Modal."""
   selenium_utils.wait_until_stops_moving(self.add_btn.element)
   selenium_utils.scroll_into_view(self._driver, self.item_el)
   selenium_utils.get_when_clickable(self._driver, self._locators.ADD_BTN_CSS)
   selenium_utils.wait_until_not_present(
       self._driver, self._locators.TREE_SPINNER_CSS)
   self.add_btn.click()
   return CustomAttributeModal(self._driver)
示例#7
0
 def add_new_custom_attribute(self):
   """
   Returns:
       new_custom_attribute.ModalCustomAttributes
   """
   selenium_utils.wait_until_stops_moving(self.button_add.element)
   selenium_utils.scroll_into_view(self._driver, self.button_add.element)
   self.button_add.click()
   return self._cls_new_attrb_modal(self._driver)
示例#8
0
 def open_add_new_ca_modal(self):
   """Open Add Attribute modal and return Custom Attribute Modal."""
   selenium_utils.wait_until_stops_moving(self.button_add.element)
   selenium_utils.scroll_into_view(self._driver, self.button_add.element)
   selenium_utils.get_when_clickable(self._driver, self._locators.ADD_BTN)
   selenium_utils.get_when_invisible(
       self._driver, self._locators.TREE_SPINNER)
   self.button_add.click()
   return CustomAttributeModal(self._driver)
示例#9
0
 def _tabs(self):
   """Dict of Tab objects. AssessmentLog tab item contains dict of
   validation result, because there is no reason for create AssessmentLog
   page object class.
   """
   selenium_utils.scroll_into_view(self._driver, self.container_element)
   return {
       self._elements.RELATED_ASMTS_TAB: AssessmentRelatedAsmtsTable,
       self._elements.RELATED_ISSUES_TAB: AssessmentRelatedIssuesTable,
       self._elements.CHANGE_LOG_TAB: self._log_tab_validate}
示例#10
0
 def _tabs(self):
     """Dict of Tab objects. AssessmentLog tab item contains dict of
 validation result, because there is no reason for create AssessmentLog
 page object class.
 """
     selenium_utils.scroll_into_view(self._driver, self.container_element)
     return {
         self._elements.RELATED_ASMTS_TAB: AssessmentRelatedAsmtsTable,
         self._elements.RELATED_ISSUES_TAB: AssessmentRelatedIssuesTable,
         self._elements.CHANGE_LOG_TAB: self._log_tab_validate
     }
示例#11
0
 def select_ca_member_by_num(self, num):
   """Select Custom Attribute member from list of members by number
   (start from 0).
   Args: num (int)
   Return: lib.page.widget.widget_base.CustomAttributeModal
   """
   # check that the buttons are loaded
   selenium_utils.get_when_clickable(self._driver, self._locators.EDIT_BTN)
   elements = self._driver.find_elements(self._locators.EDIT_BTN)
   selenium_utils.scroll_into_view(self._driver, elements[num]).click()
   return CustomAttributeModal(self._driver)
示例#12
0
    def edit_nth_member(self, member):
        """Selects nth member from listed members in the dropdown. Since we're
    selecting from a list, the first member has the index 0.

    Args:
        member (int)
    """
        # check that the buttons are loaded
        selenium_utils.get_when_clickable(self._driver, self._locator.EDIT_BTN)

        elements = self._driver.find_elements(self._locator.EDIT_BTN)
        selenium_utils.scroll_into_view(self._driver, elements[member]).click()
        return CustomAttributeModal(self._driver)
示例#13
0
 def _tabs(self):
   """Dict of Tab objects."""
   selenium_utils.scroll_into_view(self._driver, self.container_element)
   return {self._elements.CHANGE_LOG_TAB: self._log_tab_validate}
示例#14
0
 def _tabs(self):
   """Dict of Tab objects."""
   selenium_utils.scroll_into_view(self._driver, self.container_element)
   return {self._elements.CHANGE_LOG_TAB: self._log_tab_validate}