Skip to content

Commit 0e9cf85

Browse files
Merge pull request #644 from Brain-up/issue_623
Issue_623_EXERCISES_WORDS_Family_RU_PAGE_structure
2 parents 6d1bc91 + a08a0a3 commit 0e9cf85

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

pages/exercises_ru_words_family_page.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@ def get_structure_of_9th_level(self):
8181
@allure.step("Get structure of the 10th level of nesting on the page")
8282
def get_structure_of_10th_level(self):
8383
elements = self.elements_are_present(self.locators.PAGE_TENTH_LEVEL_ELEMENTS)
84-
tags = [element.tag_name for element in elements]
85-
print(*tags, len(tags), sep='\n')
84+
# tags = [element.tag_name for element in elements]
85+
# print(*tags, len(tags), sep='\n')
8686
return elements
87+
88+
@allure.step("Check if elements of the 10th level of nesting are visible")
89+
def check_elements_visibility_on_10th_level(self):
90+
return all(element.is_displayed() for element in self.get_structure_of_10th_level())

tests/exercises_ru_words_family_page_test.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def test_erwf_01_01_verify_page_presence_and_visibility(self, driver, exercises_
1515
assert page_content_presence, "The page content is absent in DOM"
1616
assert page_content_visibility, "The page content is invisible"
1717

18-
@allure.title("Verify composition, visibility of elements on the 1st-8th levels of nesting on the page")
18+
@allure.title("Verify composition, visibility of elements on the 1st-10th levels of nesting on the page")
1919
def test_erwf_01_02_verify_page_structure_and_visibility(self, driver, exercises_ru_words_family_page_open):
2020
page = erwfPage(driver)
2121
structure_of_1st_level = page.get_structure_of_1st_level()
@@ -34,6 +34,7 @@ def test_erwf_01_02_verify_page_structure_and_visibility(self, driver, exercises
3434
structure_of_8th_level = page.get_structure_of_8th_level()
3535
structure_of_9th_level = page.get_structure_of_9th_level()
3636
structure_of_10th_level = page.get_structure_of_10th_level()
37+
visibility_of_elements_on_10th_level = page.check_elements_visibility_on_10th_level()
3738
assert structure_of_1st_level, "The page is empty"
3839
assert visibility_of_elements_on_1st_level, "1th-level elements are invisible"
3940
assert structure_of_2nd_level, "Elements on the 2nd level are absent on the page"
@@ -50,3 +51,4 @@ def test_erwf_01_02_verify_page_structure_and_visibility(self, driver, exercises
5051
assert structure_of_8th_level, "Elements on the 8th level are absent on the page"
5152
assert structure_of_9th_level, "Elements on the 9th level are absent on the page"
5253
assert structure_of_10th_level, "Elements on the 10th level are absent on the page"
54+
assert visibility_of_elements_on_10th_level, "10th-level elements are invisible"

0 commit comments

Comments
 (0)