@@ -19,69 +19,56 @@ def check_visibility_of_page_content(self):
19
19
20
20
@allure .step ("Get structure of the 1st level of nesting in the section 1" )
21
21
def get_structure_of_1st_level_in_section1 (self ):
22
- elements = self .elements_are_present (self .locators .SECTION_1_FIRST_LEVEL_ELEMENTS )
23
22
# tags = [element.tag_name for element in elements]
24
- return elements
23
+ return self . elements_are_present ( self . locators . SECTION_1_FIRST_LEVEL_ELEMENTS )
25
24
26
25
@allure .step ("Check if elements of the 1st level of nesting are visible in the section 1" )
27
26
def check_elements_visibility_on_1st_level_in_section1 (self ):
28
27
return all (element .is_displayed () for element in self .get_structure_of_1st_level_in_section1 ())
29
28
30
29
@allure .step ("Get structure of the 1st level of nesting in the section 2" )
31
30
def get_structure_of_1st_level_in_section2 (self ):
32
- elements = self .elements_are_present (self .locators .SECTION_2_FIRST_LEVEL_ELEMENTS )
33
- # tags = [element.tag_name for element in elements]
34
- return elements
31
+ return self .elements_are_present (self .locators .SECTION_2_FIRST_LEVEL_ELEMENTS )
35
32
36
33
@allure .step ("Check if elements of the 1st level of nesting are visible in the section 2" )
37
34
def check_elements_visibility_on_1st_level_in_section2 (self ):
38
35
return all (element .is_displayed () for element in self .get_structure_of_1st_level_in_section2 ())
39
36
40
37
@allure .step ("Get structure of the 2nd level of nesting in the section 2" )
41
38
def get_structure_of_2nd_level_in_section2 (self ):
42
- elements = self .elements_are_present (self .locators .SECTION_2_SECOND_LEVEL_ELEMENTS )
43
- # tags = [element.tag_name for element in elements]
44
- return elements
39
+ return self .elements_are_present (self .locators .SECTION_2_SECOND_LEVEL_ELEMENTS )
45
40
46
41
@allure .step ("Check if elements of the 2nd level of nesting are visible in the section 2" )
47
42
def check_elements_visibility_on_2nd_level_in_section2 (self ):
48
43
return all (element .is_displayed () for element in self .get_structure_of_2nd_level_in_section2 ())
49
44
50
45
@allure .step ("Get structure of the 3rd level of nesting in the section 2" )
51
46
def get_structure_of_3rd_level_in_section2 (self ):
52
- elements = self .elements_are_present (self .locators .SECTION_2_THIRD_LEVEL_ELEMENTS )
53
- # tags = [element.tag_name for element in elements]
54
- return elements
47
+ return self .elements_are_present (self .locators .SECTION_2_THIRD_LEVEL_ELEMENTS )
55
48
56
49
@allure .step ("Check if elements of the 3rd level of nesting are visible in the section 2" )
57
50
def check_visibility_of_elements_on_3rd_level_in_section2 (self ):
58
51
return all (element .is_displayed () for element in self .get_structure_of_3rd_level_in_section2 ())
59
52
60
53
@allure .step ("Get structure of the 4th level of nesting in the section 2" )
61
54
def get_structure_of_4th_level_in_section2 (self ):
62
- elements = self .elements_are_present (self .locators .SECTION_2_FOURTH_LEVEL_ELEMENTS )
63
- # tags = [element.tag_name for element in elements]
64
- return elements
55
+ return self .elements_are_present (self .locators .SECTION_2_FOURTH_LEVEL_ELEMENTS )
65
56
66
57
@allure .step ("Check if elements of the 4th level of nesting are visible in the section 2" )
67
58
def check_visibility_of_elements_on_4th_level_in_section2 (self ):
68
59
return all (element .is_displayed () for element in self .get_structure_of_4th_level_in_section2 ())
69
60
70
61
@allure .step ("Get structure of the 5th level of nesting in the section 2" )
71
62
def get_structure_of_5th_level_in_section2 (self ):
72
- elements = self .elements_are_present (self .locators .SECTION_2_FIFTH_LEVEL_ELEMENTS )
73
- # tags = [element.tag_name for element in elements]
74
- return elements
63
+ return self .elements_are_present (self .locators .SECTION_2_FIFTH_LEVEL_ELEMENTS )
75
64
76
65
@allure .step ("Check if elements of the 5th level of nesting are visible in the section 2" )
77
66
def check_visibility_of_elements_on_5th_level_in_section2 (self ):
78
67
return all (element .is_displayed () for element in self .get_structure_of_5th_level_in_section2 ())
79
68
80
69
@allure .step ("Get structure of the page" )
81
70
def get_page_structure (self ):
82
- elements = self .elements_are_present (self .locators .PAGE_STRUCTURE )
83
- # tags = [element.tag_name for element in elements]
84
- return elements
71
+ return self .elements_are_present (self .locators .PAGE_STRUCTURE )
85
72
86
73
@allure .step ("Check if elements of the 1st level of nesting are visible" )
87
74
def check_visibility_of_structural_elements (self ):
@@ -93,8 +80,7 @@ def get_amount_of_sections(self):
93
80
94
81
@allure .step ("Check if sections are visible" )
95
82
def check_visibility_of_sections (self ):
96
- sections = self .elements_are_present (self .locators .PAGE_SECTIONS )
97
- return all (element .is_displayed () for element in sections )
83
+ return all (element .is_displayed () for element in self .elements_are_present (self .locators .PAGE_SECTIONS ))
98
84
99
85
@allure .step ("Check if the dividing line is present on the page" )
100
86
def check_presence_of_dividing_line (self ):
0 commit comments