Skip to content

Commit 8117181

Browse files
Merge pull request #654 from Brain-up/issue_623
Issue_623_EXERCISES_WORDS_Family_RU_PAGE_structure
2 parents 42a6ca2 + 0c5f80a commit 8117181

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

pages/exercises_ru_words_family_page.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,10 @@ def check_elements_visibility_on_13th_level(self):
124124
@allure.step("Get structure of the 14th level of nesting on the page")
125125
def get_structure_of_14th_level(self):
126126
elements = self.elements_are_present(self.locators.PAGE_FOURTEENTH_LEVEL_ELEMENTS)
127-
tags = [element.tag_name for element in elements]
128-
print(*tags, len(tags), sep='\n')
127+
# tags = [element.tag_name for element in elements]
128+
# print(*tags, len(tags), sep='\n')
129129
return elements
130+
131+
@allure.step("Check if elements of the 14th level of nesting are visible")
132+
def check_elements_visibility_on_14th_level(self):
133+
return all(element.is_displayed() for element in self.get_structure_of_14th_level())

tests/exercises_ru_words_family_page_test.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ def test_erwf_01_02_verify_page_structure_and_visibility(self, driver, exercises
4444
structure_of_13th_level = page.get_structure_of_13th_level()
4545
visibility_of_elements_on_13th_level = page.check_elements_visibility_on_13th_level()
4646
structure_of_14th_level = page.get_structure_of_14th_level()
47+
visibility_of_elements_on_14th_level = page.check_elements_visibility_on_14th_level()
4748
assert structure_of_1st_level, "The page is empty"
4849
assert visibility_of_elements_on_1st_level, "1th-level elements are invisible"
4950
assert structure_of_2nd_level, "Elements on the 2nd level are absent on the page"
@@ -70,3 +71,4 @@ def test_erwf_01_02_verify_page_structure_and_visibility(self, driver, exercises
7071
assert structure_of_13th_level, "Elements on the 13th level are absent on the page"
7172
assert visibility_of_elements_on_13th_level, "13th-level elements are invisible"
7273
assert structure_of_14th_level, "Elements on the 14th level are absent on the page"
74+
assert visibility_of_elements_on_14th_level, "14th-level elements are invisible"

0 commit comments

Comments
 (0)