Skip to content

Commit fc54400

Browse files
ref test_ersp_01.02 Verify page structure and visibility
update exercises_ru_similar_phrases_page.py #478
1 parent c520c6d commit fc54400

1 file changed

Lines changed: 8 additions & 28 deletions

File tree

pages/exercises_ru_similar_phrases_page.py

Lines changed: 8 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -19,76 +19,56 @@ def check_visibility_of_page_content(self):
1919

2020
@allure.step("Get structure of the 1st level of nesting on the page")
2121
def get_structure_of_1st_level(self):
22-
elements = self.elements_are_present(self.locators.PAGE_FIRST_LEVEL_ELEMENTS)
23-
tags = [element.tag_name for element in elements]
24-
# print(*tags)
25-
return elements
22+
# tags = [element.tag_name for element in elements]
23+
return self.elements_are_present(self.locators.PAGE_FIRST_LEVEL_ELEMENTS)
2624

2725
@allure.step("Check if elements of the 1st level of nesting are visible")
2826
def check_elements_visibility_on_1st_level(self):
2927
return all(element.is_displayed() for element in self.get_structure_of_1st_level())
3028

3129
@allure.step("Get structure of the 2nd level of nesting on the page")
3230
def get_structure_of_2nd_level(self):
33-
elements = self.elements_are_present(self.locators.PAGE_SECOND_LEVEL_ELEMENTS)
34-
tags = [element.tag_name for element in elements]
35-
# print(*tags)
36-
return elements
31+
return self.elements_are_present(self.locators.PAGE_SECOND_LEVEL_ELEMENTS)
3732

3833
@allure.step("Check if elements of the 2nd level of nesting are visible")
3934
def check_elements_visibility_on_2nd_level(self):
4035
return all(element.is_displayed() for element in self.get_structure_of_2nd_level())
4136

4237
@allure.step("Get structure of the 3rd level of nesting on the page")
4338
def get_structure_of_3rd_level(self):
44-
elements = self.elements_are_present(self.locators.PAGE_THIRD_LEVEL_ELEMENTS)
45-
tags = [element.tag_name for element in elements]
46-
# print(*tags)
47-
return elements
39+
return self.elements_are_present(self.locators.PAGE_THIRD_LEVEL_ELEMENTS)
4840

4941
@allure.step("Check if elements of the 3rd level of nesting are visible")
5042
def check_elements_visibility_on_3rd_level(self):
5143
return all(element.is_displayed() for element in self.get_structure_of_3rd_level())
5244

5345
@allure.step("Get structure of the 4th level of nesting on the page")
5446
def get_structure_of_4th_level(self):
55-
elements = self.elements_are_present(self.locators.PAGE_FOURTH_LEVEL_ELEMENTS)
56-
tags = [element.tag_name for element in elements]
57-
# print(*tags)
58-
return elements
47+
return self.elements_are_present(self.locators.PAGE_FOURTH_LEVEL_ELEMENTS)
5948

6049
@allure.step("Check if elements of the 4th level of nesting are visible")
6150
def check_elements_visibility_on_4th_level(self):
6251
return all(element.is_displayed() for element in self.get_structure_of_4th_level())
6352

6453
@allure.step("Get structure of the 5th level of nesting on the page")
6554
def get_structure_of_5th_level(self):
66-
elements = self.elements_are_present(self.locators.PAGE_FIFTH_LEVEL_ELEMENTS)
67-
tags = [element.tag_name for element in elements]
68-
# print(*tags)
69-
return elements
55+
return self.elements_are_present(self.locators.PAGE_FIFTH_LEVEL_ELEMENTS)
7056

7157
@allure.step("Check if elements of the 5th level of nesting are visible")
7258
def check_elements_visibility_on_5th_level(self):
7359
return all(element.is_displayed() for element in self.get_structure_of_5th_level())
7460

7561
@allure.step("Get structure of the 6th level of nesting on the page")
7662
def get_structure_of_6th_level(self):
77-
elements = self.elements_are_present(self.locators.PAGE_SIXTH_LEVEL_ELEMENTS)
78-
tags = [element.tag_name for element in elements]
79-
# print(*tags)
80-
return elements
63+
return self.elements_are_present(self.locators.PAGE_SIXTH_LEVEL_ELEMENTS)
8164

8265
@allure.step("Check if elements of the 6th level of nesting are visible")
8366
def check_elements_visibility_on_6th_level(self):
8467
return all(element.is_displayed() for element in self.get_structure_of_6th_level())
8568

8669
@allure.step("Get structure of the 7th level of nesting on the page")
8770
def get_structure_of_7th_level(self):
88-
elements = self.elements_are_present(self.locators.PAGE_SEVENTH_LEVEL_ELEMENTS)
89-
tags = [element.tag_name for element in elements]
90-
# print(*tags)
91-
return elements
71+
return self.elements_are_present(self.locators.PAGE_SEVENTH_LEVEL_ELEMENTS)
9272

9373
@allure.step("Check if elements of the 7th level of nesting are visible")
9474
def check_elements_visibility_on_7th_level(self):

0 commit comments

Comments
 (0)