Class Picker
- 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.Dialog
-
- com.adobe.cq.testing.selenium.pagewidgets.granite.Picker
-
public final class Picker extends Dialog
Helper to manage the picker overlay. It is displayed as a lazy loaded overlay so it inherits from OverlayComponent.
-
-
Field Summary
-
Fields inherited from class com.adobe.cq.testing.selenium.pagewidgets.coral.Dialog
variantAccessor
-
Fields inherited from class com.adobe.cq.testing.selenium.pagewidgets.common.BaseComponent
cssSelector, currentElement
-
-
Constructor Summary
Constructors Constructor Description Picker()Constructor for the PickerOverlayComponent on coral-dialog.foundation-picker-collection.is-open.Picker(java.lang.String selector)Constructor for the PickerOverlayComponent.Picker(java.lang.String selector, ViewType viewType)Creates a picker that cannot switch between views.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PickeractivateItem(java.lang.String itemId)Activate the html element associated with the provided collection item id.Pickerclose()Closes the picker overlay by clicking on its close button.Collectioncollection()ColumnViewItemgetItem(java.lang.String itemId)Gets the html element associated with the provided collection item id.PickersearchFulltext(java.lang.String keywords)PickersetViewType(ViewType viewType)Pickersubmit()Submit the picker overlay with selected Items.PickerswitchToView(ViewType viewType)PickertoggleItem(java.lang.String itemId)Toggle selection of the html element associated with the provided collection item id.-
Methods inherited from class com.adobe.cq.testing.selenium.pagewidgets.coral.Dialog
button, clickDefault, clickPrimary, clickQuietAction, clickSecondary, clickWarning, content, isError, isSuccess, title
-
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
-
Picker
public Picker()
Constructor for the PickerOverlayComponent on coral-dialog.foundation-picker-collection.is-open.
-
Picker
public Picker(java.lang.String selector)
Constructor for the PickerOverlayComponent.- Parameters:
selector- the css selector identifying the top picker html element
-
Picker
public Picker(java.lang.String selector, ViewType viewType)Creates a picker that cannot switch between views. It has only one view defined in the constructor.- Parameters:
selector- query selector to attach this picker onviewType- initial ViewType
-
-
Method Detail
-
getItem
public ColumnViewItem getItem(java.lang.String itemId)
Gets the html element associated with the provided collection item id.- Parameters:
itemId- the id of the collection item whose corresponding html element is required- Returns:
- the html element corresponding to the provided item id
-
toggleItem
public Picker toggleItem(java.lang.String itemId)
Toggle selection of the html element associated with the provided collection item id.- Parameters:
itemId- the id of the collection item to whom we want to toggle select- Returns:
- self
-
activateItem
public Picker activateItem(java.lang.String itemId)
Activate the html element associated with the provided collection item id.- Parameters:
itemId- the id of the collection item to whom we want to activate- Returns:
- self
-
close
public Picker close()
Closes the picker overlay by clicking on its close button.- Returns:
- self
-
submit
public Picker submit()
Submit the picker overlay with selected Items.- Returns:
- self
-
switchToView
public Picker switchToView(ViewType viewType)
- Parameters:
viewType- any from supported view (currently viewCard, viewTable, and viewList)- Returns:
- self object
-
searchFulltext
public Picker searchFulltext(java.lang.String keywords)
-
collection
public Collection collection()
-
-