@Override
public void fail(WebElementsCollection collection, List<WebElement> elements, Exception lastError, long timeoutMs) {
if (elements == null || elements.isEmpty()) {
throw new ElementNotFound(collection, expectedTexts, lastError, timeoutMs);
} else {
throw new TextsMismatch(collection, ElementsCollection.getTexts(elements), expectedTexts, timeoutMs);
}
}