def __header(self): if self.__header_el is None: try: self.__header_el = utils.find_element(self.driver, TopMenuLocators.HEADER) except: self.__header_el = utils.find_element( self.driver, TopMenuLocators.HEADER_OLD) return self.__header_el
def __stars(self): if self.__stars_el is None: star_svg_el = utils.find_element( self.__search_result_el, SearchResultItemLocators.OCTICON_STAR, ) self.__stars_el = elements.get_parent_of_el(star_svg_el) return self.__stars_el
def get_parent_of_el(el): return utils.find_element(el, create_xpath_locator("./.."))
def __call__(self, driver): el = utils.find_element(driver, self.locator) if not elements.el_has_class(el, self.css_class): return el else: return False
def get_sort_option(self): summary_el = utils.find_element(self.__search_sort_el, SearchSortLocators.SELECT_SUMMARY) name_el = utils.find_element(summary_el, SearchSortLocators.SELECT_SUMMARY_NAME) return name_el.text
def initialize(self): self.__select_menu_el = utils.find_element( self.__search_sort_el, SearchSortLocators.SELECT_MENU)
def open_repo_page(self): title_link_el = utils.find_element( self.__title, SearchResultItemLocators.TITLE_LINK, ) title_link_el.click()
def initialize(self): self.__pagination_el = utils.find_element( self.driver, PaginationLocators.PAGINATION)