T
- public abstract class AbstractListComponent<T extends ListItem> extends Object implements ListComponent<T>
Constructor and Description |
---|
AbstractListComponent() |
Modifier and Type | Method and Description |
---|---|
T |
getItem(ChoicePicker picker)
Gets item found by
picker . |
T |
getItem(int index)
Gets the item on the given
index . |
T |
getItem(String text)
Gets the item which text representation is exact match with the given param
text |
List<T> |
getItems()
Gets all items from this list.
|
List<T> |
getItems(MultipleChoicePicker picker)
Gets multiple items accoriding to the rules given in
picker param. |
protected List<org.openqa.selenium.WebElement> |
getItemsElements() |
protected List<T> |
getItemsFragments() |
protected Class<T> |
getListItemClass() |
org.openqa.selenium.WebElement |
getRootElement()
Gets the root of this component.
|
protected List<T> |
instantiateFragments(Class<T> klass,
List<org.openqa.selenium.WebElement> itemsRoots) |
protected T |
instantiateItemFragment(Class<T> klass,
org.openqa.selenium.WebElement item) |
boolean |
isEmpty()
Founds out whether the list is empty or not.
|
boolean |
isVisible() |
int |
size()
Gets the size of this list component.
|
public T getItem(int index)
ListComponent
index
.getItem
in interface ListComponent<T extends ListItem>
index
- index of the item to be returnedpublic T getItem(String text)
ListComponent
text
getItem
in interface ListComponent<T extends ListItem>
text
- the text according to which the item will be returnedpublic T getItem(ChoicePicker picker)
ListComponent
picker
.getItem
in interface ListComponent<T extends ListItem>
picker
- for picking from the itemsChoicePickerHelper.ByIndexChoicePicker
,
ChoicePickerHelper.ByVisibleTextChoicePicker
public List<T> getItems(MultipleChoicePicker picker)
ListComponent
picker
param.getItems
in interface ListComponent<T extends ListItem>
picker
- for picking from listMultipleChoicePicker
public List<T> getItems()
ListComponent
getItems
in interface ListComponent<T extends ListItem>
protected List<org.openqa.selenium.WebElement> getItemsElements()
public org.openqa.selenium.WebElement getRootElement()
ListComponent
getRootElement
in interface ListComponent<T extends ListItem>
protected List<T> instantiateFragments(Class<T> klass, List<org.openqa.selenium.WebElement> itemsRoots)
protected T instantiateItemFragment(Class<T> klass, org.openqa.selenium.WebElement item)
public boolean isEmpty()
ListComponent
isEmpty
in interface ListComponent<T extends ListItem>
public int size()
ListComponent
size
in interface ListComponent<T extends ListItem>
public boolean isVisible()
Copyright © 2015 JBoss by Red Hat. All Rights Reserved.