Class CoralSelectList
- 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.CoralSelectList
-
public final class CoralSelectList extends AEMBaseComponent
-
-
Field Summary
-
Fields inherited from class com.adobe.cq.testing.selenium.pagewidgets.common.BaseComponent
cssSelector, currentElement
-
-
Constructor Summary
Constructors Constructor Description CoralSelectList(com.codeborne.selenide.SelenideElement parent)CoralSelectList(java.lang.String selector)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.codeborne.selenide.SelenideElementgetGroupByLabel(java.lang.String label)com.codeborne.selenide.SelenideElementgetItemByValue(java.lang.String value)com.codeborne.selenide.ElementsCollectiongroups()booleanhasItemBySelector(java.lang.String selector)Determines if an option exists on the cyclebutton.com.codeborne.selenide.ElementsCollectionitems()com.codeborne.selenide.ElementsCollectionitems(com.codeborne.selenide.SelenideElement group)voidselectByIndex(int index)Clicks an item.voidselectByLabel(java.lang.String label)Clicks an item.voidselectByValue(java.lang.String value)Clicks an item.com.codeborne.selenide.SelenideElementselectedItem()java.lang.StringselectedItemLabel()Returns the label of the selected item.-
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
-
-
-
-
Constructor Detail
-
CoralSelectList
public CoralSelectList(com.codeborne.selenide.SelenideElement parent)
- Parameters:
parent- the parent element containing this select list.
-
CoralSelectList
public CoralSelectList(java.lang.String selector)
- Parameters:
selector- the selector to wrap this object on.
-
-
Method Detail
-
items
public com.codeborne.selenide.ElementsCollection items()
- Returns:
- all the items in this list.
-
items
public com.codeborne.selenide.ElementsCollection items(com.codeborne.selenide.SelenideElement group)
- Parameters:
group- coral-selectist-group element for which all the items needs to be returned- Returns:
- all the items of a group in this list.
-
groups
public com.codeborne.selenide.ElementsCollection groups()
- Returns:
- all the groups in this list.
-
getGroupByLabel
public com.codeborne.selenide.SelenideElement getGroupByLabel(java.lang.String label)
- Parameters:
label- label of the targeted group in this list.- Returns:
- the element or null if it doesn't exist.
-
getItemByValue
public com.codeborne.selenide.SelenideElement getItemByValue(java.lang.String value)
- Parameters:
value- value of the targeted item in this list.- Returns:
- the element or null if it doesn't exist.
-
selectedItem
public com.codeborne.selenide.SelenideElement selectedItem()
- Returns:
- the selected item element or null if it doesn't exist.
-
selectedItemLabel
public java.lang.String selectedItemLabel()
Returns the label of the selected item.- Returns:
- the selected label.
-
selectByValue
public void selectByValue(java.lang.String value)
Clicks an item.- Parameters:
value- - the value of the item in the rail toggle.
-
selectByIndex
public void selectByIndex(int index)
Clicks an item.- Parameters:
index- - the index of the item in the rail toggle.
-
selectByLabel
public void selectByLabel(java.lang.String label)
Clicks an item.- Parameters:
label- - the selector of the item in the rail toggle.
-
hasItemBySelector
public boolean hasItemBySelector(java.lang.String selector)
Determines if an option exists on the cyclebutton.- Parameters:
selector- - the selector of the item in the rail toggle.- Returns:
- true if an option exists or not on the cyclebutton.
-
-