public class ElementsCollection extends java.util.AbstractList<SelenideElement>
| Constructor and Description |
|---|
ElementsCollection(WebElementsCollection collection) |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
elementsToString(java.util.Collection<org.openqa.selenium.WebElement> elements)
Outputs string presentation of the element's collection
|
ElementsCollection |
exclude(Condition condition)
Filters elements excluding those which met the given condition
|
ElementsCollection |
excludeWith(Condition condition)
Filters elements excluding those which met the given condition
|
ElementsCollection |
filter(Condition condition)
Filters collection elements based on the given condition
|
ElementsCollection |
filterBy(Condition condition)
Filters collection elements based on the given condition
|
SelenideElement |
find(Condition condition)
Finde the first element which met the given condition
|
SelenideElement |
findBy(Condition condition)
Finde the first element which met the given condition
|
SelenideElement |
first()
return the first element of the collection
|
SelenideElement |
get(int index) |
java.lang.String[] |
getTexts()
Gets all the texts in elements collection
|
static java.lang.String[] |
getTexts(java.util.Collection<org.openqa.selenium.WebElement> elements)
Fail-safe method for retrieving texts of given elements.
|
java.util.Iterator<SelenideElement> |
iterator() |
SelenideElement |
last()
return the last element of the collection
|
java.util.ListIterator<SelenideElement> |
listIterator(int index) |
protected ElementsCollection |
should(java.lang.String prefix,
CollectionCondition... conditions) |
ElementsCollection |
shouldBe(CollectionCondition... conditions)
$$(".error").shouldBe(empty)
|
ElementsCollection |
shouldHave(CollectionCondition... conditions)
$$(".error").shouldHave(size(3))
$$(".error").shouldHave(texts("Error1", "Error2"))
|
ElementsCollection |
shouldHaveSize(int expectedSize)
Checks is the collection is of given size
|
int |
size() |
java.lang.String |
toString() |
protected void |
waitUntil(CollectionCondition condition,
long timeoutMs) |
add, add, addAll, clear, equals, hashCode, indexOf, lastIndexOf, listIterator, remove, removeRange, set, subListaddAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArrayclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic ElementsCollection(WebElementsCollection collection)
public ElementsCollection shouldHaveSize(int expectedSize)
expectedSize - public ElementsCollection shouldBe(CollectionCondition... conditions)
public ElementsCollection shouldHave(CollectionCondition... conditions)
protected ElementsCollection should(java.lang.String prefix, CollectionCondition... conditions)
protected void waitUntil(CollectionCondition condition, long timeoutMs)
public ElementsCollection filter(Condition condition)
condition - public ElementsCollection filterBy(Condition condition)
condition - filter(Condition)public ElementsCollection exclude(Condition condition)
condition - public ElementsCollection excludeWith(Condition condition)
condition - exclude(Condition)public SelenideElement find(Condition condition)
condition - public SelenideElement findBy(Condition condition)
condition - find(Condition)public java.lang.String[] getTexts()
public static java.lang.String[] getTexts(java.util.Collection<org.openqa.selenium.WebElement> elements)
elements - Any collection of WebElementspublic static java.lang.String elementsToString(java.util.Collection<org.openqa.selenium.WebElement> elements)
elements - public SelenideElement get(int index)
get in interface java.util.List<SelenideElement>get in class java.util.AbstractList<SelenideElement>public SelenideElement first()
public SelenideElement last()
public int size()
size in interface java.util.Collection<SelenideElement>size in interface java.util.List<SelenideElement>size in class java.util.AbstractCollection<SelenideElement>public java.util.Iterator<SelenideElement> iterator()
iterator in interface java.lang.Iterable<SelenideElement>iterator in interface java.util.Collection<SelenideElement>iterator in interface java.util.List<SelenideElement>iterator in class java.util.AbstractList<SelenideElement>public java.util.ListIterator<SelenideElement> listIterator(int index)
listIterator in interface java.util.List<SelenideElement>listIterator in class java.util.AbstractList<SelenideElement>public java.lang.String toString()
toString in class java.util.AbstractCollection<SelenideElement>