Skip to content

Commit 48d488e

Browse files
Merge pull request #737 from Brain-up/issue_623
Issue_623_EXERCISES_WORDS_Family_RU_PAGE_structure
2 parents 647ca77 + acd6aa7 commit 48d488e

1 file changed

Lines changed: 11 additions & 5 deletions

File tree

‎pages/exercises_ru_words_family_page.py‎

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import allure
55
from pages.base_page import BasePage
66
from locators.exercises_ru_words_family_page_locators import ExercisesRuWordsFamilyPageLocators
7+
from selenium.webdriver.support.wait import WebDriverWait as Wait
78

89

910
class ExercisesRuWordsFamilyPage(BasePage):
@@ -29,7 +30,8 @@ def check_elements_visibility_on_1st_level1(self):
2930
@allure.step("Check if elements of the 1st level of nesting are visible -- ACTUAL")
3031
def check_elements_visibility_on_1st_level(self):
3132
elements = self.elements_are_present(self.locators.PAGE_FIRST_LEVEL_ELEMENTS)
32-
return all(element.is_displayed() for element in elements)
33+
Wait(self.driver, 10).until(lambda d: all(element.is_displayed() for element in elements))
34+
return True
3335

3436
@allure.step("Get structure of the 2nd level of nesting on the page -- FOR REVIEW")
3537
def get_structure_of_2nd_level(self):
@@ -42,7 +44,8 @@ def check_elements_visibility_on_2nd_level1(self):
4244
@allure.step("Check if elements of the 2nd level of nesting are visible -- ACTUAL")
4345
def check_elements_visibility_on_2nd_level(self):
4446
elements = self.elements_are_present(self.locators.PAGE_SECOND_LEVEL_ELEMENTS)
45-
return all(element.is_displayed() for element in elements)
47+
Wait(self.driver, 10).until(lambda d: all(element.is_displayed() for element in elements))
48+
return True
4649

4750
@allure.step("Get structure of the 3rd level of nesting on the page -- FOR REVIEW")
4851
def get_structure_of_3rd_level(self):
@@ -55,7 +58,8 @@ def check_elements_visibility_on_3rd_level1(self):
5558
@allure.step("Check if elements of the 3rd level of nesting are visible -- ACTUAL")
5659
def check_elements_visibility_on_3rd_level(self):
5760
elements = self.elements_are_present(self.locators.PAGE_THIRD_LEVEL_ELEMENTS)
58-
return all(element.is_displayed() for element in elements)
61+
Wait(self.driver, 10).until(lambda d: all(element.is_displayed() for element in elements))
62+
return True
5963

6064
@allure.step("Get structure of the 4th level of nesting on the page")
6165
def get_structure_of_4th_level(self):
@@ -64,7 +68,8 @@ def get_structure_of_4th_level(self):
6468
@allure.step("Check if elements of the 4th level of nesting are visible -- ACTUAL")
6569
def check_elements_visibility_on_4th_level(self):
6670
elements = self.elements_are_present(self.locators.PAGE_FOURTH_LEVEL_ELEMENTS)
67-
return all(element.is_displayed() for element in elements)
71+
Wait(self.driver, 10).until(lambda d: all(element.is_displayed() for element in elements))
72+
return True
6873

6974
@allure.step("Get structure of the 5th level of nesting on the page -- FOR REVIEW")
7075
def get_structure_of_5th_level(self):
@@ -77,7 +82,8 @@ def check_elements_visibility_on_5th_level1(self):
7782
@allure.step("Check if elements of the 5th level of nesting are visible -- ACTUAL")
7883
def check_elements_visibility_on_5th_level(self):
7984
elements = self.elements_are_present(self.locators.PAGE_FIFTH_LEVEL_ELEMENTS)
80-
return all(element.is_displayed() for element in elements)
85+
Wait(self.driver, 10).until(lambda d: all(element.is_displayed() for element in elements))
86+
return True
8187

8288
@allure.step("Get structure of the 6th level of nesting on the page")
8389
def get_structure_of_6th_level(self):

0 commit comments

Comments
 (0)