Skip to content

Commit

Permalink
ExpectedConditions.presenceOfNestedElementsLocatedBy should check tha…
Browse files Browse the repository at this point in the history
…t at least one element is returned

Fixes SeleniumHQ#3214
  • Loading branch information
lukeis committed Dec 7, 2016
1 parent 465ef4d commit bc10e16
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1361,7 +1361,10 @@ public List<WebElement> apply(WebDriver webDriver) {
try {
elements = webDriver.findElement(locator).findElements(sub_locator);
} catch (Exception e) {/**/}
return elements;
if (elements != null && elements.size() > 0) {
return elements;
}
return null;
}

@Override
Expand Down

0 comments on commit bc10e16

Please sign in to comment.