From 6c2500364f9f4ad72856821c7bb8614ca8ea6313 Mon Sep 17 00:00:00 2001 From: Alena Krauch Date: Fri, 16 Jan 2026 13:00:13 +0300 Subject: [PATCH] ref test_erwf_01.02 Verify page structure and visibility update exercises_ru_words_family_page_test.py, exercises_ru_words_family_page.py #623 --- pages/exercises_ru_words_family_page.py | 4 ++++ tests/exercises_ru_words_family_page_test.py | 2 ++ 2 files changed, 6 insertions(+) diff --git a/pages/exercises_ru_words_family_page.py b/pages/exercises_ru_words_family_page.py index 6bd09d4477..c00c54a34c 100644 --- a/pages/exercises_ru_words_family_page.py +++ b/pages/exercises_ru_words_family_page.py @@ -85,6 +85,10 @@ def check_elements_invisibility_on_8th_level(self): def get_structure_of_9th_level(self): return self.elements_are_present(self.locators.PAGE_NINTH_LEVEL_ELEMENTS) + @allure.step("Check if elements of the 9th level of nesting are visible") + def check_elements_visibility_on_9th_level(self): + return all(element.is_displayed() for element in self.get_structure_of_9th_level()) + @allure.step("Get structure of the 10th level of nesting on the page") def get_structure_of_10th_level(self): elements = self.elements_are_present(self.locators.PAGE_TENTH_LEVEL_ELEMENTS) diff --git a/tests/exercises_ru_words_family_page_test.py b/tests/exercises_ru_words_family_page_test.py index 4e399fcf51..5f9d3c47d1 100644 --- a/tests/exercises_ru_words_family_page_test.py +++ b/tests/exercises_ru_words_family_page_test.py @@ -34,6 +34,7 @@ def test_erwf_01_02_verify_page_structure_and_visibility(self, driver, exercises structure_of_8th_level = page.get_structure_of_8th_level() visibility_of_elements_on_8th_level = page.check_elements_visibility_on_8th_level() structure_of_9th_level = page.get_structure_of_9th_level() + visibility_of_elements_on_9th_level = page.check_elements_visibility_on_9th_level() structure_of_10th_level = page.get_structure_of_10th_level() visibility_of_elements_on_10th_level = page.check_elements_visibility_on_10th_level() assert structure_of_1st_level, "The page is empty" @@ -52,5 +53,6 @@ def test_erwf_01_02_verify_page_structure_and_visibility(self, driver, exercises assert structure_of_8th_level, "Elements on the 8th level are absent on the page" assert not visibility_of_elements_on_8th_level, "8th-level elements are visible" assert structure_of_9th_level, "Elements on the 9th level are absent on the page" + assert not visibility_of_elements_on_9th_level, "9th-level elements are visible" assert structure_of_10th_level, "Elements on the 10th level are absent on the page" assert visibility_of_elements_on_10th_level, "10th-level elements are invisible"