27
27
import static org .mockito .Mockito .when ;
28
28
import static org .openqa .selenium .support .ui .ExpectedConditions .elementSelectionStateToBe ;
29
29
import static org .openqa .selenium .support .ui .ExpectedConditions .not ;
30
+ import static org .openqa .selenium .support .ui .ExpectedConditions .numberOfWindowsToBe ;
30
31
import static org .openqa .selenium .support .ui .ExpectedConditions .textToBePresentInElementLocated ;
31
32
import static org .openqa .selenium .support .ui .ExpectedConditions .urlContains ;
32
33
import static org .openqa .selenium .support .ui .ExpectedConditions .urlMatches ;
33
34
import static org .openqa .selenium .support .ui .ExpectedConditions .urlToBe ;
34
35
import static org .openqa .selenium .support .ui .ExpectedConditions .visibilityOf ;
35
36
import static org .openqa .selenium .support .ui .ExpectedConditions .visibilityOfAllElements ;
36
37
import static org .openqa .selenium .support .ui .ExpectedConditions .visibilityOfAllElementsLocatedBy ;
37
- import static org .openqa .selenium .support .ui .ExpectedConditions .numberOfwindowsToBe ;
38
38
39
39
import com .google .common .collect .Lists ;
40
40
import com .google .common .collect .Sets ;
@@ -451,15 +451,15 @@ public void waitingNumberOfWindowsToBeTwoWhenThereAreTwoWindowsOpen() {
451
451
Set <String > twoWindowHandles = Sets .newHashSet ("w1" , "w2" );
452
452
when (mockDriver .getWindowHandles ()).thenReturn (twoWindowHandles );
453
453
454
- assertTrue (wait .until (numberOfwindowsToBe (2 )));
454
+ assertTrue (wait .until (numberOfWindowsToBe (2 )));
455
455
}
456
456
457
457
@ Test (expected = TimeoutException .class )
458
458
public void waitingNumberOfWindowsToBeTwoThrowsTimeoutExceptionWhenThereAreThreeWindowsOpen () {
459
459
Set <String > threeWindowHandles = Sets .newHashSet ("w1" , "w2" , "w3" );
460
460
when (mockDriver .getWindowHandles ()).thenReturn (threeWindowHandles );
461
461
462
- wait .until (numberOfwindowsToBe (2 ));
462
+ wait .until (numberOfWindowsToBe (2 ));
463
463
464
464
// then TimeoutException is thrown
465
465
}
@@ -468,7 +468,7 @@ public void waitingNumberOfWindowsToBeTwoThrowsTimeoutExceptionWhenThereAreThree
468
468
public void waitingNumberOfWindowsToBeThrowsTimeoutExceptionWhenGetWindowHandlesThrowsWebDriverException () {
469
469
when (mockDriver .getWindowHandles ()).thenThrow (WebDriverException .class );
470
470
471
- wait .until (numberOfwindowsToBe (2 ));
471
+ wait .until (numberOfWindowsToBe (2 ));
472
472
473
473
// then TimeoutException is thrown
474
474
}
0 commit comments