Skip to content

Commit

Permalink
Consistent wording for options that can't be found
Browse files Browse the repository at this point in the history
  • Loading branch information
labkey-tchad authored and p0deje committed Dec 18, 2018
1 parent f87a732 commit aed1c2a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions java/client/src/org/openqa/selenium/support/ui/Select.java
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ public void selectByVisibleText(String text) {
}

if (!matched) {
throw new NoSuchElementException("Cannot locate element with text: " + text);
throw new NoSuchElementException("Cannot locate option with text: " + text);
}
}

Expand Down Expand Up @@ -269,7 +269,7 @@ public void deselectByVisibleText(String text) {
List<WebElement> options = element.findElements(By.xpath(
".//option[normalize-space(.) = " + Quotes.escape(text) + "]"));
if (options.isEmpty()) {
throw new NoSuchElementException("Cannot locate element with text: " + text);
throw new NoSuchElementException("Cannot locate option with text: " + text);
}

for (WebElement option : options) {
Expand Down

0 comments on commit aed1c2a

Please sign in to comment.