From 5d10b83011c8ec91f63f74bb4f93e8b76d0965a7 Mon Sep 17 00:00:00 2001 From: Alena Krauch Date: Mon, 14 Jul 2025 12:06:28 +0300 Subject: [PATCH] ref test_su_01.02, _su_01.03 update start_unauthorized_page.py --- pages/start_unauthorized_page.py | 26 +++++++------------------- 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/pages/start_unauthorized_page.py b/pages/start_unauthorized_page.py index 43f3fa3b2c..3b7a9deda8 100644 --- a/pages/start_unauthorized_page.py +++ b/pages/start_unauthorized_page.py @@ -21,8 +21,7 @@ def check_visibility_of_page_content(self): @allure.step("Get amount of sections with content on the page") def get_amount_of_sections_on_page(self): - sections = self.elements_are_present(self.locators.PAGE_SECTIONS) - return len(sections) + return len(self.elements_are_present(self.locators.PAGE_SECTIONS)) @allure.step("Check sections are visible") def check_visibility_of_sections(self): @@ -31,9 +30,8 @@ def check_visibility_of_sections(self): @allure.step("Get structure of the 1st level of nesting in the section 1") def get_structure_of_1st_level_in_section1(self): - elements = self.elements_are_present(self.locators.SECTION_1_FIRST_LEVEL_ELEMENTS) # tags = [element.tag_name for element in elements] - return elements + return self.elements_are_present(self.locators.SECTION_1_FIRST_LEVEL_ELEMENTS) @allure.step("Check if elements of the 1st level of nesting are visible in the section 1") def check_elements_visibility_on_1st_level_in_section1(self): @@ -41,9 +39,7 @@ def check_elements_visibility_on_1st_level_in_section1(self): @allure.step("Get structure of the 2nd level of nesting in the section 1") def get_structure_of_2nd_level_in_section1(self): - elements = self.elements_are_present(self.locators.SECTION_1_SECOND_LEVEL_ELEMENTS) - # tags = [element.tag_name for element in elements] - return elements + return self.elements_are_present(self.locators.SECTION_1_SECOND_LEVEL_ELEMENTS) @allure.step("Check if elements of the 2nd level of nesting are visible in the section 1") def check_elements_visibility_on_2nd_level_in_section1(self): @@ -51,9 +47,7 @@ def check_elements_visibility_on_2nd_level_in_section1(self): @allure.step("Get structure of the 3rd level of nesting in the section 1") def get_structure_of_3rd_level_in_section1(self): - elements = self.elements_are_present(self.locators.SECTION_1_THIRD_LEVEL_ELEMENTS) - # tags = [element.tag_name for element in elements] - return elements + return self.elements_are_present(self.locators.SECTION_1_THIRD_LEVEL_ELEMENTS) @allure.step("Check if elements of the 3rd level of nesting are visible in the section 1") def check_visibility_of_elements_on_3rd_level_in_section1(self): @@ -61,9 +55,7 @@ def check_visibility_of_elements_on_3rd_level_in_section1(self): @allure.step("Get structure of the 1st level of nesting in the section 2") def get_structure_of_1st_level_in_section2(self): - elements = self.elements_are_present(self.locators.SECTION_2_FIRST_LEVEL_ELEMENTS) - # tags = [element.tag_name for element in elements] - return elements + return self.elements_are_present(self.locators.SECTION_2_FIRST_LEVEL_ELEMENTS) @allure.step("Check if elements of the 1st level of nesting are visible in the section 2") def check_elements_visibility_on_1st_level_in_section2(self): @@ -71,9 +63,7 @@ def check_elements_visibility_on_1st_level_in_section2(self): @allure.step("Get structure of the 2nd level of nesting in the section 2") def get_structure_of_2nd_level_in_section2(self): - elements = self.elements_are_present(self.locators.SECTION_2_SECOND_LEVEL_ELEMENTS) - # tags = [element.tag_name for element in elements] - return elements + return self.elements_are_present(self.locators.SECTION_2_SECOND_LEVEL_ELEMENTS) @allure.step("Check if elements of the 2nd level of nesting are visible in the section 2") def check_elements_visibility_on_2nd_level_in_section2(self): @@ -81,9 +71,7 @@ def check_elements_visibility_on_2nd_level_in_section2(self): @allure.step("Get structure of the 3rd level of nesting in the section 2") def get_structure_of_3rd_level_in_section2(self): - elements = self.elements_are_present(self.locators.SECTION_2_THIRD_LEVEL_ELEMENTS) - # tags = [element.tag_name for element in elements] - return elements + return self.elements_are_present(self.locators.SECTION_2_THIRD_LEVEL_ELEMENTS) @allure.step("Check if elements of the 3rd level of nesting are visible in the section 2") def check_visibility_of_elements_on_3rd_level_in_section2(self):