Skip to content

Commit e9ffa1c

Browse files
ref test_erwf_01.02 Verify page structure and visibility
update exercises_ru_words_family_page_test.py, exercises_ru_words_family_page.py, exercises_ru_words_family_page_locators.py #623
1 parent e748b1e commit e9ffa1c

3 files changed

Lines changed: 8 additions & 1 deletion

File tree

locators/exercises_ru_words_family_page_locators.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ class ExercisesRuWordsFamilyPageLocators:
1212
PAGE_SIXTH_LEVEL_ELEMENTS = (By.XPATH, "//main/*/*/*/*/*/*")
1313
PAGE_SEVENTH_LEVEL_ELEMENTS = (By.XPATH, "//main/*/*/*/*/*/*/*")
1414
PAGE_EIGHTH_LEVEL_ELEMENTS = (By.XPATH, "//main/*/*/*/*/*/*/*/*")
15+
PAGE_NINTH_LEVEL_ELEMENTS = (By.XPATH, "//main/*/*/*/*/*/*/*/*/*")

pages/exercises_ru_words_family_page.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,11 @@ def check_elements_visibility_on_7th_level(self):
7272

7373
@allure.step("Get structure of the 8th level of nesting on the page")
7474
def get_structure_of_8th_level(self):
75-
elements = self.elements_are_present(self.locators.PAGE_EIGHTH_LEVEL_ELEMENTS)
75+
return self.elements_are_present(self.locators.PAGE_EIGHTH_LEVEL_ELEMENTS)
76+
77+
@allure.step("Get structure of the 9th level of nesting on the page")
78+
def get_structure_of_9th_level(self):
79+
elements = self.elements_are_present(self.locators.PAGE_NINTH_LEVEL_ELEMENTS)
7680
tags = [element.tag_name for element in elements]
7781
print(*tags, sep='\n')
7882
return elements

tests/exercises_ru_words_family_page_test.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ def test_erwf_01_02_verify_page_structure_and_visibility(self, driver, exercises
3232
structure_of_7th_level = page.get_structure_of_7th_level()
3333
visibility_of_elements_on_7th_level = page.check_elements_visibility_on_7th_level()
3434
structure_of_8th_level = page.get_structure_of_8th_level()
35+
structure_of_9th_level = page.get_structure_of_9th_level()
3536
assert structure_of_1st_level, "The page is empty"
3637
assert visibility_of_elements_on_1st_level, "1th-level elements are invisible"
3738
assert structure_of_2nd_level, "Elements on the 2nd level are absent on the page"
@@ -46,3 +47,4 @@ def test_erwf_01_02_verify_page_structure_and_visibility(self, driver, exercises
4647
assert structure_of_7th_level, "Elements on the 7th level are absent on the page"
4748
assert visibility_of_elements_on_7th_level, "7th-level elements are invisible"
4849
assert structure_of_8th_level, "Elements on the 8th level are absent on the page"
50+
assert structure_of_9th_level, "Elements on the 9th level are absent on the page"

0 commit comments

Comments
 (0)