Class CollectionSwitcher
- 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.granite.CollectionSwitcher
-
public class CollectionSwitcher extends AEMBaseComponent
The collection switcher component wrapper.
-
-
Field Summary
-
Fields inherited from class com.adobe.cq.testing.selenium.pagewidgets.common.BaseComponent
cssSelector, currentElement
-
-
Constructor Summary
Constructors Constructor Description CollectionSwitcher()Construct a CollectionSwitcherComponent.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanswitchToView(ViewType viewType)Tries to switch the attached collection to the specified view.-
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
-
switchToView
public boolean switchToView(ViewType viewType)
Tries to switch the attached collection to the specified view. It identifies the switcher and checks if the icon for the current view is already the one desired. If not, clicks the switcher to show the overlay with the possible views and chose from there.- Parameters:
viewType- - the icon corresponding to the view to switch to.- Returns:
- {Boolean}
trueif the view was indeed changed orfalseif the desired view was already already the current one.
-
-