Skip to content

Issue_227_CONTACTS_PAGE_tests #562

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 19, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 8 additions & 22 deletions pages/contacts_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,69 +19,56 @@ def check_visibility_of_page_content(self):

@allure.step("Get structure of the 1st level of nesting in the section 1")
def get_structure_of_1st_level_in_section1(self):
elements = self.elements_are_present(self.locators.SECTION_1_FIRST_LEVEL_ELEMENTS)
# tags = [element.tag_name for element in elements]
return elements
return self.elements_are_present(self.locators.SECTION_1_FIRST_LEVEL_ELEMENTS)

@allure.step("Check if elements of the 1st level of nesting are visible in the section 1")
def check_elements_visibility_on_1st_level_in_section1(self):
return all(element.is_displayed() for element in self.get_structure_of_1st_level_in_section1())

@allure.step("Get structure of the 1st level of nesting in the section 2")
def get_structure_of_1st_level_in_section2(self):
elements = self.elements_are_present(self.locators.SECTION_2_FIRST_LEVEL_ELEMENTS)
# tags = [element.tag_name for element in elements]
return elements
return self.elements_are_present(self.locators.SECTION_2_FIRST_LEVEL_ELEMENTS)

@allure.step("Check if elements of the 1st level of nesting are visible in the section 2")
def check_elements_visibility_on_1st_level_in_section2(self):
return all(element.is_displayed() for element in self.get_structure_of_1st_level_in_section2())

@allure.step("Get structure of the 2nd level of nesting in the section 2")
def get_structure_of_2nd_level_in_section2(self):
elements = self.elements_are_present(self.locators.SECTION_2_SECOND_LEVEL_ELEMENTS)
# tags = [element.tag_name for element in elements]
return elements
return self.elements_are_present(self.locators.SECTION_2_SECOND_LEVEL_ELEMENTS)

@allure.step("Check if elements of the 2nd level of nesting are visible in the section 2")
def check_elements_visibility_on_2nd_level_in_section2(self):
return all(element.is_displayed() for element in self.get_structure_of_2nd_level_in_section2())

@allure.step("Get structure of the 3rd level of nesting in the section 2")
def get_structure_of_3rd_level_in_section2(self):
elements = self.elements_are_present(self.locators.SECTION_2_THIRD_LEVEL_ELEMENTS)
# tags = [element.tag_name for element in elements]
return elements
return self.elements_are_present(self.locators.SECTION_2_THIRD_LEVEL_ELEMENTS)

@allure.step("Check if elements of the 3rd level of nesting are visible in the section 2")
def check_visibility_of_elements_on_3rd_level_in_section2(self):
return all(element.is_displayed() for element in self.get_structure_of_3rd_level_in_section2())

@allure.step("Get structure of the 4th level of nesting in the section 2")
def get_structure_of_4th_level_in_section2(self):
elements = self.elements_are_present(self.locators.SECTION_2_FOURTH_LEVEL_ELEMENTS)
# tags = [element.tag_name for element in elements]
return elements
return self.elements_are_present(self.locators.SECTION_2_FOURTH_LEVEL_ELEMENTS)

@allure.step("Check if elements of the 4th level of nesting are visible in the section 2")
def check_visibility_of_elements_on_4th_level_in_section2(self):
return all(element.is_displayed() for element in self.get_structure_of_4th_level_in_section2())

@allure.step("Get structure of the 5th level of nesting in the section 2")
def get_structure_of_5th_level_in_section2(self):
elements = self.elements_are_present(self.locators.SECTION_2_FIFTH_LEVEL_ELEMENTS)
# tags = [element.tag_name for element in elements]
return elements
return self.elements_are_present(self.locators.SECTION_2_FIFTH_LEVEL_ELEMENTS)

@allure.step("Check if elements of the 5th level of nesting are visible in the section 2")
def check_visibility_of_elements_on_5th_level_in_section2(self):
return all(element.is_displayed() for element in self.get_structure_of_5th_level_in_section2())

@allure.step("Get structure of the page")
def get_page_structure(self):
elements = self.elements_are_present(self.locators.PAGE_STRUCTURE)
# tags = [element.tag_name for element in elements]
return elements
return self.elements_are_present(self.locators.PAGE_STRUCTURE)

@allure.step("Check if elements of the 1st level of nesting are visible")
def check_visibility_of_structural_elements(self):
Expand All @@ -93,8 +80,7 @@ def get_amount_of_sections(self):

@allure.step("Check if sections are visible")
def check_visibility_of_sections(self):
sections = self.elements_are_present(self.locators.PAGE_SECTIONS)
return all(element.is_displayed() for element in sections)
return all(element.is_displayed() for element in self.elements_are_present(self.locators.PAGE_SECTIONS))

@allure.step("Check if the dividing line is present on the page")
def check_presence_of_dividing_line(self):
Expand Down
Loading