Skip to content

Commit

Permalink
This condition should be opposite :(
Browse files Browse the repository at this point in the history
  • Loading branch information
barancev committed Apr 4, 2017
1 parent 44ef2cb commit 45dc056
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ public Set<String> apply(WebDriver driver) {

public static ExpectedCondition<String> newWindowIsOpened(final Set<String> originalHandles) {
return driver -> driver.getWindowHandles().stream()
.filter(originalHandles::contains).findFirst().orElse(null);
.filter(handle -> ! originalHandles.contains(handle)).findFirst().orElse(null);
}

public static ExpectedCondition<WebDriver> windowToBeSwitchedToWithName(final String windowName) {
Expand Down

0 comments on commit 45dc056

Please sign in to comment.