Created
August 12, 2014 16:30
-
-
Save anonymous/828a4041e88854301e74 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Wait<WebDriver> wait = new FluentWait<WebDriver>(driver) | |
.withTimeout(30, TimeUnit.SECONDS) | |
.pollingEvery(1, TimeUnit.SECONDS) | |
.ignoreAll(NoSuchWindowException.class, NoSuchElementException.class); | |
wait.until(new Function<WebDriver, OtherPage>() { | |
@Override | |
public WebElement apply(WebDriver input) { | |
input.switchTo.window("newWindowName"); | |
return new OtherPage(input); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment