Class Omnisearch
- 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.Omnisearch
-
public final class Omnisearch extends AEMBaseComponent
The Omnisearch component wrapper.
-
-
Field Summary
-
Fields inherited from class com.adobe.cq.testing.selenium.pagewidgets.common.BaseComponent
cssSelector, currentElement
-
-
Constructor Summary
Constructors Constructor Description Omnisearch()Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.codeborne.selenide.ElementsCollectionallSimpleSearchResults()Get all simple search results without workflows.voidclose()Close the omnisearch integration.com.codeborne.selenide.SelenideElementgetActionBarItem(java.lang.String selector)Get the element representing the action bar item.com.codeborne.selenide.SelenideElementgetFirstLaunchFromResults()Open the first launch found in the search results.com.codeborne.selenide.SelenideElementgetPredicateInput(java.lang.String name)Get the input element for the path predicate from the left rail.com.codeborne.selenide.SelenideElementgetPredicateTag(java.lang.String name)Get the tag element for the path predicate from the tag list.intgetSearchResultCount()Get total count of search Result.booleanisVisible()Returns if omnisearch is visible to the user If its open but not visible(e.g.voidopen()Open the omnisearch integration.voidopenFirstAssetFromResults()Open the first asset found in the search results.voidopenFromFilter()Open the omnisearch integration bu clicking the filter toggle option.voidopenSimpleSearchResult(int itemNumber)Open a desired search result item in the simple search result.voidopenViaSearchUrl()Open the omnisearch integration via a call of the search url directly.voidopenWorkflowSearchResult(int rowNumber, int itemNumber)Open a desired search result item in the workflow multi result.com.codeborne.selenide.SelenideElementresultContent()Get the resultContent element.com.codeborne.selenide.ElementsCollectionresultMultiRows()Get the resultMultiRows element.voidsearch(java.lang.String searchText)Search in omnisearch for a specific search text.com.codeborne.selenide.SelenideElementsearchField()Get the searchField element.voidselectPredicate(java.lang.String predicateValue)Select a predicate from the suggestion list.voidshowSuggestions(java.lang.String searchText)Display suggestions for a specific search text.voidtoggleFilter()Toggle the filter.-
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, isVisibleWithinViewport, render, scrollTo, waitDisabled, waitEnabled, waitVanish, waitVisible
-
-
-
-
Method Detail
-
searchField
public com.codeborne.selenide.SelenideElement searchField()
Get the searchField element.- Returns:
- searchField.
-
resultContent
public com.codeborne.selenide.SelenideElement resultContent()
Get the resultContent element.- Returns:
- resultContent.
-
resultMultiRows
public com.codeborne.selenide.ElementsCollection resultMultiRows()
Get the resultMultiRows element.- Returns:
- multiple rows elements.
-
allSimpleSearchResults
public com.codeborne.selenide.ElementsCollection allSimpleSearchResults()
Get all simple search results without workflows.- Returns:
- multiple item elements.
-
open
public void open()
Open the omnisearch integration.
-
openViaSearchUrl
public void openViaSearchUrl()
Open the omnisearch integration via a call of the search url directly.
-
close
public void close()
Close the omnisearch integration.
-
isVisible
public boolean isVisible()
Returns if omnisearch is visible to the user If its open but not visible(e.g. overlayed with another element) this is false.- Overrides:
isVisiblein classBaseComponent- Returns:
- true if omnisearch is visible to the user.
-
toggleFilter
public void toggleFilter() throws java.util.concurrent.TimeoutExceptionToggle the filter.- Throws:
java.util.concurrent.TimeoutException
-
search
public void search(java.lang.String searchText)
Search in omnisearch for a specific search text.- Parameters:
searchText- - The text for searching.
-
openWorkflowSearchResult
public void openWorkflowSearchResult(int rowNumber, int itemNumber)Open a desired search result item in the workflow multi result.- Parameters:
rowNumber- Result row, start index from 1itemNumber- Item in row, start index from 1
-
openSimpleSearchResult
public void openSimpleSearchResult(int itemNumber)
Open a desired search result item in the simple search result.- Parameters:
itemNumber- - Item to select
-
openFirstAssetFromResults
public void openFirstAssetFromResults()
Open the first asset found in the search results.
-
getFirstLaunchFromResults
public com.codeborne.selenide.SelenideElement getFirstLaunchFromResults()
Open the first launch found in the search results.- Returns:
- get first omnisearch result
-
showSuggestions
public void showSuggestions(java.lang.String searchText)
Display suggestions for a specific search text.- Parameters:
searchText- The text to get the suggestions.
-
selectPredicate
public void selectPredicate(java.lang.String predicateValue)
Select a predicate from the suggestion list.- Parameters:
predicateValue- - Predicate with value to select
-
openFromFilter
public void openFromFilter()
Open the omnisearch integration bu clicking the filter toggle option.
-
getActionBarItem
public com.codeborne.selenide.SelenideElement getActionBarItem(java.lang.String selector)
Get the element representing the action bar item.- Parameters:
selector- The css selector used to distinguish the desired action bar item from the other items. This selector will be appended to a prefix selector that identifies the parent element of all the Omnisearch action bar items.- Returns:
- the actionbar item element
-
getPredicateInput
public com.codeborne.selenide.SelenideElement getPredicateInput(java.lang.String name)
Get the input element for the path predicate from the left rail.- Parameters:
name- The name of the predicate.- Returns:
- the predicate input element
-
getPredicateTag
public com.codeborne.selenide.SelenideElement getPredicateTag(java.lang.String name)
Get the tag element for the path predicate from the tag list.- Parameters:
name- - The name of the predicate.- Returns:
- the predicate tag element.
-
getSearchResultCount
public int getSearchResultCount()
Get total count of search Result.- Returns:
- return total count of search result.
-
-