From 6af32b1f9f124359410487b7ac50f16bfbaba92d Mon Sep 17 00:00:00 2001 From: Alena Krauch Date: Sat, 21 Feb 2026 20:42:33 +0300 Subject: [PATCH] ref test_erwf_01.05 Verify page structural elements update exercises_ru_words_family_page_test.py, exercises_ru_words_family_page.py #623 --- pages/exercises_ru_words_family_page.py | 8 ++++++-- tests/exercises_ru_words_family_page_test.py | 2 ++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/pages/exercises_ru_words_family_page.py b/pages/exercises_ru_words_family_page.py index 95ea6b437f..6ac0538afb 100644 --- a/pages/exercises_ru_words_family_page.py +++ b/pages/exercises_ru_words_family_page.py @@ -143,6 +143,10 @@ def check_list1_visibility(self): @allure.step("Check the list2 on the 5th level of nesting is present on the page") def get_list2_of_group_links(self): elements = self.elements_are_present(self.locators.PAGE_LIST2) - att = [element.get_attribute("title") for element in elements] - print(*att, len(att), sep='\n') + # att = [element.get_attribute("title") for element in elements] + # print(*att, len(att), sep='\n') return elements + + @allure.step("Check the list2 is visible") + def check_list2_visibility(self): + return all(element.is_displayed() for element in self.get_list2_of_group_links()) diff --git a/tests/exercises_ru_words_family_page_test.py b/tests/exercises_ru_words_family_page_test.py index 2be27c726c..44046c728c 100644 --- a/tests/exercises_ru_words_family_page_test.py +++ b/tests/exercises_ru_words_family_page_test.py @@ -87,6 +87,8 @@ def test_erwf_01_05_verify_page_structural_elements(self, driver, exercises_ru_w list1_on_5th_level = page.get_list1_of_breadcrumbs_links() list1_visibility = page.check_list1_visibility() list2_on_5th_level = page.get_list2_of_group_links() + list2_visibility = page.check_list2_visibility() assert list1_on_5th_level, "The list1 on the 5th level is absent on the page" assert list1_visibility, "The list1 on the 5th level is invisible" assert list2_on_5th_level, "The list2 on the 5th level is absent on the page" + assert list2_visibility, "The list2 on the 5th level is invisible"