Class CoralList
- java.lang.Object
-
- com.adobe.cq.testing.selenium.pagewidgets.common.BaseComponent
-
- com.adobe.cq.testing.selenium.pagewidgets.common.AEMBaseComponent
-
- com.adobe.cq.testing.selenium.pagewidgets.coral.CoralList
-
public final class CoralList extends AEMBaseComponent
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classCoralList.CoralListItem
-
Field Summary
-
Fields inherited from class com.adobe.cq.testing.selenium.pagewidgets.common.BaseComponent
cssSelector, currentElement
-
-
Constructor Summary
Constructors Constructor Description CoralList(java.lang.String cssSelector)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.stream.Stream<CoralList.CoralListItem>getItemsByAttribute(java.lang.String attribute, java.lang.String value)booleanhasItemByAttribute(java.lang.String attribute, java.lang.String value)Determines if an item exists in the list.java.util.stream.Stream<CoralList.CoralListItem>items()com.codeborne.selenide.ElementsCollectionitemsCollection()CoralList.CoralListItemselectedItem()voidwaitForItemByAttribute(java.lang.String attribute, java.lang.String expectedValue)Poll the list for any item with matching value for given attribute.-
Methods inherited from class com.adobe.cq.testing.selenium.pagewidgets.common.AEMBaseComponent
getAction, getTrackingElement, waitPageMasked, waitPageUnmasked, waitReady
-
Methods inherited from class com.adobe.cq.testing.selenium.pagewidgets.common.BaseComponent
adaptTo, click, element, getCssSelector, isExisting, isVisible, isVisibleWithinViewport, render, scrollTo, waitDisabled, waitEnabled, waitVanish, waitVisible
-
-
-
-
Method Detail
-
getItemsByAttribute
public java.util.stream.Stream<CoralList.CoralListItem> getItemsByAttribute(java.lang.String attribute, java.lang.String value)
- Parameters:
attribute- attribute selector string.value- value to match with.- Returns:
- the stream of CoralListItem that matches.
-
selectedItem
public CoralList.CoralListItem selectedItem()
- Returns:
- the selected item element or null if it doesn't exist.
-
hasItemByAttribute
public boolean hasItemByAttribute(java.lang.String attribute, java.lang.String value)Determines if an item exists in the list.- Parameters:
attribute- attribute selector string.value- value to match with.- Returns:
- true if the list contains the attribute / value pairs.
-
items
public java.util.stream.Stream<CoralList.CoralListItem> items()
- Returns:
- a stream of CoralListItem from this list.
-
itemsCollection
public com.codeborne.selenide.ElementsCollection itemsCollection()
- Returns:
- collection of CoralListItem from this list.
-
waitForItemByAttribute
public void waitForItemByAttribute(java.lang.String attribute, java.lang.String expectedValue)Poll the list for any item with matching value for given attribute.- Parameters:
attribute- attribute nameexpectedValue- expected value for this attribute.
-
-