Skip to content
6 changes: 0 additions & 6 deletions src/main/java/aquality/selenium/elements/ComboBox.java
Original file line number Diff line number Diff line change
Expand Up @@ -96,18 +96,12 @@ public void clickAndSelectByValue(String value) {

@Override
public String getSelectedText() {
if(ElementFinder.getInstance().findElements(getLocator(), getDefaultTimeout(), getElementState()).isEmpty()) {
throw new IllegalStateException(String.format(getLocManager().getValue("loc.element.wasnotfoundinstate"), getName(), getElementState(), getDefaultTimeout()));
}
return ElementActionRetrier.doWithRetry(() -> new Select(getElement()).getFirstSelectedOption().getText());
}

@Override
public List<String> getValues() {
getLogger().info(getLocManager().getValue("loc.combobox.get.values"));
if(ElementFinder.getInstance().findElements(getLocator(), getDefaultTimeout(), getElementState()).isEmpty()){
throw new IllegalStateException(String.format(getLocManager().getValue("loc.element.wasnotfoundinstate"), getName(), getElementState(), getDefaultTimeout()));
}
return ElementActionRetrier.doWithRetry(() ->
new Select(getElement()).getOptions()
.stream()
Expand Down