diff --git a/locators/exercises_ru_words_family_page_locators.py b/locators/exercises_ru_words_family_page_locators.py index 728d2ac0b4..b6a25ab276 100644 --- a/locators/exercises_ru_words_family_page_locators.py +++ b/locators/exercises_ru_words_family_page_locators.py @@ -12,3 +12,4 @@ class ExercisesRuWordsFamilyPageLocators: PAGE_SIXTH_LEVEL_ELEMENTS = (By.XPATH, "//main/*/*/*/*/*/*") PAGE_SEVENTH_LEVEL_ELEMENTS = (By.XPATH, "//main/*/*/*/*/*/*/*") PAGE_EIGHTH_LEVEL_ELEMENTS = (By.XPATH, "//main/*/*/*/*/*/*/*/*") + PAGE_NINTH_LEVEL_ELEMENTS = (By.XPATH, "//main/*/*/*/*/*/*/*/*/*") diff --git a/pages/exercises_ru_words_family_page.py b/pages/exercises_ru_words_family_page.py index 6d653e9508..46f356c6e5 100644 --- a/pages/exercises_ru_words_family_page.py +++ b/pages/exercises_ru_words_family_page.py @@ -72,7 +72,11 @@ def check_elements_visibility_on_7th_level(self): @allure.step("Get structure of the 8th level of nesting on the page") def get_structure_of_8th_level(self): - elements = self.elements_are_present(self.locators.PAGE_EIGHTH_LEVEL_ELEMENTS) + return self.elements_are_present(self.locators.PAGE_EIGHTH_LEVEL_ELEMENTS) + + @allure.step("Get structure of the 9th level of nesting on the page") + def get_structure_of_9th_level(self): + elements = self.elements_are_present(self.locators.PAGE_NINTH_LEVEL_ELEMENTS) tags = [element.tag_name for element in elements] print(*tags, 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 7095144367..667c221912 100644 --- a/tests/exercises_ru_words_family_page_test.py +++ b/tests/exercises_ru_words_family_page_test.py @@ -32,6 +32,7 @@ def test_erwf_01_02_verify_page_structure_and_visibility(self, driver, exercises structure_of_7th_level = page.get_structure_of_7th_level() visibility_of_elements_on_7th_level = page.check_elements_visibility_on_7th_level() structure_of_8th_level = page.get_structure_of_8th_level() + structure_of_9th_level = page.get_structure_of_9th_level() assert structure_of_1st_level, "The page is empty" assert visibility_of_elements_on_1st_level, "1th-level elements are invisible" assert structure_of_2nd_level, "Elements on the 2nd level are absent on the page" @@ -46,3 +47,4 @@ def test_erwf_01_02_verify_page_structure_and_visibility(self, driver, exercises assert structure_of_7th_level, "Elements on the 7th level are absent on the page" assert visibility_of_elements_on_7th_level, "7th-level elements are invisible" assert structure_of_8th_level, "Elements on the 8th level are absent on the page" + assert structure_of_9th_level, "Elements on the 9th level are absent on the page"