File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
py/test/selenium/webdriver/common Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -69,7 +69,14 @@ def testShouldWaitUntilAtLeastOneVisibleElementsIsFoundWhenSearchingForMany(self
69
69
add_visible .click ()
70
70
add_hidden .click ()
71
71
72
- elements = WebDriverWait (driver , 2 ).until (EC .visibility_of_any_elements_located ((By .CLASS_NAME , "redbox" )))
72
+ class wait_for_two_elements (object ):
73
+ def __init__ (self , locator ):
74
+ self .locator = locator
75
+ def __call__ (self , driver ):
76
+ elements = [element for element in EC ._find_elements (driver , self .locator ) if EC ._element_if_visible (element )]
77
+ return elements if len (elements ) == 2 else False
78
+
79
+ elements = WebDriverWait (driver , 2 ).until (wait_for_two_elements ((By .CLASS_NAME , "redbox" )))
73
80
assert len (elements ) == 2
74
81
75
82
def testShouldFailToFindVisibleElementsWhenExplicitWaiting (self , driver , pages ):
You can’t perform that action at this time.
0 commit comments