/** * Gets all the texts in elements collection * @return array of texts */ public List<String> texts() { return texts(getElements()); }
@Override public void fail(WebElementsCollection collection, List<WebElement> elements, Exception lastError, long timeoutMs) { if (elements == null || elements.isEmpty()) { ElementNotFound elementNotFound = new ElementNotFound(collection, expectedTexts, lastError); elementNotFound.timeoutMs = timeoutMs; throw elementNotFound; } else { throw new TextsMismatch(collection, ElementsCollection.texts(elements), expectedTexts, explanation, timeoutMs); } }