diff --git a/locators/exercises_ru_words_family_page_locators.py b/locators/exercises_ru_words_family_page_locators.py index bb2728ab2c..bc17f950f6 100644 --- a/locators/exercises_ru_words_family_page_locators.py +++ b/locators/exercises_ru_words_family_page_locators.py @@ -18,3 +18,4 @@ class ExercisesRuWordsFamilyPageLocators: PAGE_TWELFTH_LEVEL_ELEMENTS = (By.XPATH, "//main/*/*/*/*/*/*/*/*/*/*/*/*") PAGE_THIRTEENTH_LEVEL_ELEMENTS = (By.XPATH, "//main/*/*/*/*/*/*/*/*/*/*/*/*/*") PAGE_FOURTEENTH_LEVEL_ELEMENTS = (By.XPATH, "//main/*/*/*/*/*/*/*/*/*/*/*/*/*/*") + PAGE_LIST1 = (By.XPATH, '//ul[@aria-label="Breadcrumbs"]//a') diff --git a/pages/exercises_ru_words_family_page.py b/pages/exercises_ru_words_family_page.py index 70222ced56..ca424dd0a9 100644 --- a/pages/exercises_ru_words_family_page.py +++ b/pages/exercises_ru_words_family_page.py @@ -131,3 +131,10 @@ def get_structure_of_14th_level(self): @allure.step("Check if elements of the 14th level of nesting are visible") def check_elements_visibility_on_14th_level(self): return all(element.is_displayed() for element in self.get_structure_of_14th_level()) + + @allure.step("Check the list1 on the 5th level of nesting is present on the page") + def get_list1_of_breadcrumbs_links(self): + elements = self.elements_are_present(self.locators.PAGE_LIST1) + att = [element.get_attribute("href") for element in elements] + print(*att, len(att), sep='\n') + return elements diff --git a/tests/exercises_ru_words_family_page_test.py b/tests/exercises_ru_words_family_page_test.py index 0ba642f6c1..57bfb0b526 100644 --- a/tests/exercises_ru_words_family_page_test.py +++ b/tests/exercises_ru_words_family_page_test.py @@ -80,3 +80,9 @@ def test_erwf_01_04_verify_page_structure_and_visibility(self, driver, exercises assert visibility_of_elements_on_13th_level, "13th-level elements are invisible" assert structure_of_14th_level, "Elements on the 14th level are absent on the page" assert visibility_of_elements_on_14th_level, "14th-level elements are invisible" + + @allure.title("Verify presence, visibility of lists on the page") + def test_erwf_01_05_verify_page_structural_elements(self, driver, exercises_ru_words_family_page_open): + page = erwfPage(driver) + list1_on_5th_level = page.get_list1_of_breadcrumbs_links() + assert list1_on_5th_level, "The list1 on the 5th level is absent on the page"