@@ -22,109 +22,88 @@ def check_visibility_of_page_content(self):
22
22
23
23
@allure .step ("Get structure of the 1st level of nesting on the page" )
24
24
def get_structure_of_1st_level (self ):
25
- elements = self .elements_are_present (self .locators .PAGE_FIRST_LEVEL_ELEMENTS )
26
- tags = [element .tag_name for element in elements ]
27
- return elements
25
+ # tags = [element.tag_name for element in elements]
26
+ return self .elements_are_present (self .locators .PAGE_FIRST_LEVEL_ELEMENTS )
28
27
29
28
@allure .step ("Check if elements of the 1st level of nesting are visible" )
30
29
def check_elements_visibility_on_1st_level (self ):
31
30
return all (element .is_displayed () for element in self .get_structure_of_1st_level ())
32
31
33
32
@allure .step ("Get structure of the 2nd level of nesting on the page" )
34
33
def get_structure_of_2nd_level (self ):
35
- elements = self .elements_are_present (self .locators .PAGE_SECOND_LEVEL_ELEMENTS )
36
- tags = [element .tag_name for element in elements ]
37
- return elements
34
+ return self .elements_are_present (self .locators .PAGE_SECOND_LEVEL_ELEMENTS )
38
35
39
36
@allure .step ("Check if elements of the 2nd level of nesting are visible" )
40
37
def check_elements_visibility_on_2nd_level (self ):
41
38
return all (element .is_displayed () for element in self .get_structure_of_2nd_level ())
42
39
43
40
@allure .step ("Get structure of the 3rd level of nesting on the page" )
44
41
def get_structure_of_3rd_level (self ):
45
- elements = self .elements_are_present (self .locators .PAGE_THIRD_LEVEL_ELEMENTS )
46
- tags = [element .tag_name for element in elements ]
47
- return elements
42
+ return self .elements_are_present (self .locators .PAGE_THIRD_LEVEL_ELEMENTS )
48
43
49
44
@allure .step ("Check if elements of the 3rd level of nesting are visible" )
50
45
def check_elements_visibility_on_3rd_level (self ):
51
46
return all (element .is_displayed () for element in self .get_structure_of_3rd_level ())
52
47
53
48
@allure .step ("Get structure of the 4th level of nesting on the page" )
54
49
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
- return elements
50
+ return self .elements_are_present (self .locators .PAGE_FOURTH_LEVEL_ELEMENTS )
58
51
59
52
@allure .step ("Check if elements of the 4th level of nesting are visible" )
60
53
def check_elements_visibility_on_4th_level (self ):
61
54
return all (element .is_displayed () for element in self .get_structure_of_4th_level ())
62
55
63
56
@allure .step ("Get structure of the 5th level of nesting on the page" )
64
57
def get_structure_of_5th_level (self ):
65
- elements = self .elements_are_present (self .locators .PAGE_FIFTH_LEVEL_ELEMENTS )
66
- tags = [element .tag_name for element in elements ]
67
- return elements
58
+ return self .elements_are_present (self .locators .PAGE_FIFTH_LEVEL_ELEMENTS )
68
59
69
60
@allure .step ("Check if elements of the 5th level of nesting are visible" )
70
61
def check_elements_visibility_on_5th_level (self ):
71
62
return all (element .is_displayed () for element in self .get_structure_of_5th_level ())
72
63
73
64
@allure .step ("Get structure of the 6th level of nesting on the page" )
74
65
def get_structure_of_6th_level (self ):
75
- elements = self .elements_are_present (self .locators .PAGE_SIXTH_LEVEL_ELEMENTS )
76
- tags = [element .tag_name for element in elements ]
77
- return elements
66
+ return self .elements_are_present (self .locators .PAGE_SIXTH_LEVEL_ELEMENTS )
78
67
79
68
@allure .step ("Check if elements of the 6th level of nesting are visible" )
80
69
def check_elements_visibility_on_6th_level (self ):
81
70
return all (element .is_displayed () for element in self .get_structure_of_6th_level ())
82
71
83
72
@allure .step ("Get structure of the 7th level of nesting on the page" )
84
73
def get_structure_of_7th_level (self ):
85
- elements = self .elements_are_present (self .locators .PAGE_SEVENTH_LEVEL_ELEMENTS )
86
- tags = [element .tag_name for element in elements ]
87
- return elements
74
+ return self .elements_are_present (self .locators .PAGE_SEVENTH_LEVEL_ELEMENTS )
88
75
89
76
@allure .step ("Check if elements of the 7th level of nesting are visible" )
90
77
def check_elements_visibility_on_7th_level (self ):
91
78
return all (element .is_displayed () for element in self .get_structure_of_7th_level ())
92
79
93
80
@allure .step ("Check the list1 on the 5th level of nesting is present on the page" )
94
81
def get_list1_of_breadcrumbs_links (self ):
95
- elements = self .elements_are_present (self .locators .PAGE_LIST1 )
96
- tags = [element .tag_name for element in elements ]
97
- return elements
82
+ return self .elements_are_present (self .locators .PAGE_LIST1 )
98
83
99
84
@allure .step ("Check the list1 is visible" )
100
85
def check_list1_visibility (self ):
101
86
return all (element .is_displayed () for element in self .get_list1_of_breadcrumbs_links ())
102
87
103
88
@allure .step ("Check the list2 on the 5th level of nesting is present on the page" )
104
89
def get_list2_of_group_links (self ):
105
- elements = self .elements_are_present (self .locators .PAGE_LIST2 )
106
- tags = [element .tag_name for element in elements ]
107
- return elements
90
+ return self .elements_are_present (self .locators .PAGE_LIST2 )
108
91
109
92
@allure .step ("Check the list2 is visible" )
110
93
def check_list2_visibility (self ):
111
94
return all (element .is_displayed () for element in self .get_list2_of_group_links ())
112
95
113
96
@allure .step ("Check the list3 on the 5th level of nesting is present on the page" )
114
97
def get_list3_of_subgroup_links (self ):
115
- elements = self .elements_are_present (self .locators .PAGE_LIST3 )
116
- tags = [element .tag_name for element in elements ]
117
- return elements
98
+ return self .elements_are_present (self .locators .PAGE_LIST3 )
118
99
119
100
@allure .step ("Check the list3 is visible" )
120
101
def check_list3_visibility (self ):
121
102
return all (element .is_displayed () for element in self .get_list3_of_subgroup_links ())
122
103
123
104
@allure .step ("Check the list4 on the 6th level of nesting is present on the page" )
124
105
def get_list4_of_links (self ):
125
- elements = self .elements_are_present (self .locators .CARD_IMAGES_LIST4 )
126
- tags = [element .tag_name for element in elements ]
127
- return elements
106
+ return self .elements_are_present (self .locators .CARD_IMAGES_LIST4 )
128
107
129
108
@allure .step ("Check the list4 is visible" )
130
109
def check_list4_visibility (self ):
0 commit comments