From 70c2ff03e1f2e1acc36fd8e0b1455997fb4ef948 Mon Sep 17 00:00:00 2001 From: Alena Krauch Date: Sat, 12 Jul 2025 09:00:13 +0300 Subject: [PATCH] ref test_sp_01.02 update specialists_page.py --- pages/specialists_page.py | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/pages/specialists_page.py b/pages/specialists_page.py index 950ae0996d..d40f4e2a33 100644 --- a/pages/specialists_page.py +++ b/pages/specialists_page.py @@ -28,9 +28,8 @@ def check_visibility_of_page_content(self): @allure.step("Get structure of the 1st level of nesting on the page") def get_structure_of_1st_level(self): - elements = self.elements_are_present(self.locators.PAGE_FIRST_LEVEL_ELEMENTS) # tags = [element.tag_name for element in elements] - return elements + return self.elements_are_present(self.locators.PAGE_FIRST_LEVEL_ELEMENTS) @allure.step("Check if elements of the 1st level of nesting are visible") def check_elements_visibility_on_1st_level_on_page(self): @@ -38,8 +37,7 @@ def check_elements_visibility_on_1st_level_on_page(self): @allure.step("Get structure of the 2nd level of nesting on the page") def get_structure_of_2nd_level(self): - elements = self.elements_are_present(self.locators.PAGE_SECOND_LEVEL_ELEMENTS) - return elements + return self.elements_are_present(self.locators.PAGE_SECOND_LEVEL_ELEMENTS) @allure.step("Check if elements of the 2nd level of nesting are visible") def check_elements_visibility_on_2nd_level_on_page(self): @@ -47,8 +45,7 @@ def check_elements_visibility_on_2nd_level_on_page(self): @allure.step("Get structure of the 3rd level of nesting on the page") def get_structure_of_3rd_level(self): - elements = self.elements_are_present(self.locators.PAGE_THIRD_LEVEL_ELEMENTS) - return elements + return self.elements_are_present(self.locators.PAGE_THIRD_LEVEL_ELEMENTS) @allure.step("Check if elements of the 3rd level of nesting are visible") def check_elements_visibility_on_3rd_level_on_page(self): @@ -56,8 +53,7 @@ def check_elements_visibility_on_3rd_level_on_page(self): @allure.step("Get structure of the 4th level of nesting on the page") def get_structure_of_4th_level(self): - elements = self.elements_are_present(self.locators.PAGE_FOURTH_LEVEL_ELEMENTS) - return elements + return self.elements_are_present(self.locators.PAGE_FOURTH_LEVEL_ELEMENTS) @allure.step("Check if elements of the 4th level of nesting are visible") def check_elements_visibility_on_4th_level_on_page(self): @@ -65,8 +61,7 @@ def check_elements_visibility_on_4th_level_on_page(self): @allure.step("Get structure of the 5th level of nesting on the page") def get_structure_of_5th_level(self): - elements = self.elements_are_present(self.locators.PAGE_FIFTH_LEVEL_ELEMENTS) - return elements + return self.elements_are_present(self.locators.PAGE_FIFTH_LEVEL_ELEMENTS) @allure.step("Check if elements of the 5th level of nesting are visible") def check_elements_visibility_on_5th_level_on_page(self): @@ -74,8 +69,7 @@ def check_elements_visibility_on_5th_level_on_page(self): @allure.step("Get structure of the 6th level of nesting on the page") def get_structure_of_6th_level(self): - elements = self.elements_are_present(self.locators.PAGE_SIXTH_LEVEL_ELEMENTS) - return elements + return self.elements_are_present(self.locators.PAGE_SIXTH_LEVEL_ELEMENTS) @allure.step("Check if elements of the 6th level of nesting are visible") def check_elements_visibility_on_6th_level_on_page(self):