@@ -21,8 +21,7 @@ def check_visibility_of_page_content(self):
21
21
22
22
@allure .step ("Get amount of sections with content on the page" )
23
23
def get_amount_of_sections_on_page (self ):
24
- sections = self .elements_are_present (self .locators .PAGE_SECTIONS )
25
- return len (sections )
24
+ return len (self .elements_are_present (self .locators .PAGE_SECTIONS ))
26
25
27
26
@allure .step ("Check sections are visible" )
28
27
def check_visibility_of_sections (self ):
@@ -31,59 +30,48 @@ def check_visibility_of_sections(self):
31
30
32
31
@allure .step ("Get structure of the 1st level of nesting in the section 1" )
33
32
def get_structure_of_1st_level_in_section1 (self ):
34
- elements = self .elements_are_present (self .locators .SECTION_1_FIRST_LEVEL_ELEMENTS )
35
33
# tags = [element.tag_name for element in elements]
36
- return elements
34
+ return self . elements_are_present ( self . locators . SECTION_1_FIRST_LEVEL_ELEMENTS )
37
35
38
36
@allure .step ("Check if elements of the 1st level of nesting are visible in the section 1" )
39
37
def check_elements_visibility_on_1st_level_in_section1 (self ):
40
38
return all (element .is_displayed () for element in self .get_structure_of_1st_level_in_section1 ())
41
39
42
40
@allure .step ("Get structure of the 2nd level of nesting in the section 1" )
43
41
def get_structure_of_2nd_level_in_section1 (self ):
44
- elements = self .elements_are_present (self .locators .SECTION_1_SECOND_LEVEL_ELEMENTS )
45
- # tags = [element.tag_name for element in elements]
46
- return elements
42
+ return self .elements_are_present (self .locators .SECTION_1_SECOND_LEVEL_ELEMENTS )
47
43
48
44
@allure .step ("Check if elements of the 2nd level of nesting are visible in the section 1" )
49
45
def check_elements_visibility_on_2nd_level_in_section1 (self ):
50
46
return all (element .is_displayed () for element in self .get_structure_of_2nd_level_in_section1 ())
51
47
52
48
@allure .step ("Get structure of the 3rd level of nesting in the section 1" )
53
49
def get_structure_of_3rd_level_in_section1 (self ):
54
- elements = self .elements_are_present (self .locators .SECTION_1_THIRD_LEVEL_ELEMENTS )
55
- # tags = [element.tag_name for element in elements]
56
- return elements
50
+ return self .elements_are_present (self .locators .SECTION_1_THIRD_LEVEL_ELEMENTS )
57
51
58
52
@allure .step ("Check if elements of the 3rd level of nesting are visible in the section 1" )
59
53
def check_visibility_of_elements_on_3rd_level_in_section1 (self ):
60
54
return all (element .is_displayed () for element in self .get_structure_of_3rd_level_in_section1 ())
61
55
62
56
@allure .step ("Get structure of the 1st level of nesting in the section 2" )
63
57
def get_structure_of_1st_level_in_section2 (self ):
64
- elements = self .elements_are_present (self .locators .SECTION_2_FIRST_LEVEL_ELEMENTS )
65
- # tags = [element.tag_name for element in elements]
66
- return elements
58
+ return self .elements_are_present (self .locators .SECTION_2_FIRST_LEVEL_ELEMENTS )
67
59
68
60
@allure .step ("Check if elements of the 1st level of nesting are visible in the section 2" )
69
61
def check_elements_visibility_on_1st_level_in_section2 (self ):
70
62
return all (element .is_displayed () for element in self .get_structure_of_1st_level_in_section2 ())
71
63
72
64
@allure .step ("Get structure of the 2nd level of nesting in the section 2" )
73
65
def get_structure_of_2nd_level_in_section2 (self ):
74
- elements = self .elements_are_present (self .locators .SECTION_2_SECOND_LEVEL_ELEMENTS )
75
- # tags = [element.tag_name for element in elements]
76
- return elements
66
+ return self .elements_are_present (self .locators .SECTION_2_SECOND_LEVEL_ELEMENTS )
77
67
78
68
@allure .step ("Check if elements of the 2nd level of nesting are visible in the section 2" )
79
69
def check_elements_visibility_on_2nd_level_in_section2 (self ):
80
70
return all (element .is_displayed () for element in self .get_structure_of_2nd_level_in_section2 ())
81
71
82
72
@allure .step ("Get structure of the 3rd level of nesting in the section 2" )
83
73
def get_structure_of_3rd_level_in_section2 (self ):
84
- elements = self .elements_are_present (self .locators .SECTION_2_THIRD_LEVEL_ELEMENTS )
85
- # tags = [element.tag_name for element in elements]
86
- return elements
74
+ return self .elements_are_present (self .locators .SECTION_2_THIRD_LEVEL_ELEMENTS )
87
75
88
76
@allure .step ("Check if elements of the 3rd level of nesting are visible in the section 2" )
89
77
def check_visibility_of_elements_on_3rd_level_in_section2 (self ):
0 commit comments