Skip to content
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
19 changes: 5 additions & 14 deletions pages/contributors_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,49 +20,40 @@ def check_visibility_of_page_content(self):

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

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

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

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

@allure.step("Get structure of the 3rd level of nesting on the page")
def get_structure_of_3rd_level(self):
elements = self.elements_are_present(self.locators.PAGE_THIRD_LEVEL_ELEMENTS)
# tags = [element.tag_name for element in elements]
return elements
return self.elements_are_present(self.locators.PAGE_THIRD_LEVEL_ELEMENTS)

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

@allure.step("Get structure of the 4th level of nesting on the page")
def get_structure_of_4th_level(self):
elements = self.elements_are_present(self.locators.PAGE_FOURTH_LEVEL_ELEMENTS)
# tags = [element.tag_name for element in elements]
return elements
return self.elements_are_present(self.locators.PAGE_FOURTH_LEVEL_ELEMENTS)

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

@allure.step("Get structure of the 5th level of nesting on the page")
def get_structure_of_5th_level(self):
elements = self.elements_are_present(self.locators.PAGE_FIFTH_LEVEL_ELEMENTS)
# tags = [element.tag_name for element in elements]
return elements
return self.elements_are_present(self.locators.PAGE_FIFTH_LEVEL_ELEMENTS)

@allure.step("Check the title h2 on the 2nd level of nesting is present on the page")
def check_title_presence(self):
Expand Down
Loading