Class FilterOverlay
java.lang.Object
com.onenetwork.platform.tools.test.ui.components.Component
com.onenetwork.platform.tools.test.ui.components.Container
com.onenetwork.platform.tools.test.ui.components.FilterOverlay
public class FilterOverlay extends Container
Represents an instance of
One.filter.FilterOverlay.
-
Field Summary
Fields Modifier and Type Field Description static org.openqa.selenium.By
ADD_FILTER_ID
static org.openqa.selenium.By
CLEAR_ID
static org.openqa.selenium.By
CLOSE_ID
static org.openqa.selenium.By
EDIT_ID
protected org.openqa.selenium.WebElement
editLinkEl
static org.openqa.selenium.By
ERROR_ID
protected org.openqa.selenium.WebElement
filterOverlayEl
static org.openqa.selenium.By
OVERLAY_ID
static org.openqa.selenium.By
SEARCH_ID
-
Constructor Summary
Constructors Constructor Description FilterOverlay(UIContext context, org.openqa.selenium.WebElement element)
The [element] passed in actually represents the filter overlay plugin, because the filter overlay may not have been rendered yet, so you should keep this in mind when subclassing. -
Method Summary
Modifier and Type Method Description boolean
clear()
Reset all the FiltersCompositeField
clickDynamicFilterListItem(java.lang.String fieldLabel)
Adds a dynamic filter field to the overlay and returns a Component if it is not already present Remove the Dynamic filter if already present instance which represents it.FilterOverlay
close()
void
executeSearch()
org.openqa.selenium.WebElement
getAddLinkEl()
protected org.openqa.selenium.WebElement
getCloseLinkEl()
CompositeField
getDynamicFilterByLabel(java.lang.String fieldLabel)
Either returns existing filter field by label or adds a dynamic one to the overlay.org.openqa.selenium.WebElement
getErrorMessage()
To get the Error WebElement Returns null if error message is hidden Returns WebElement if error message is visibleorg.openqa.selenium.WebElement
getFilterOverlayEl()
Returns the element that represents the filter overlay.protected org.openqa.selenium.WebElement
getFilterOverlayEl(boolean forceOpen)
java.lang.String
getFilterSummary()
Hyperlink
getLink(java.lang.String linkText)
To get the edit link present on filter overlay Returns Hyperlink component of edit linkorg.openqa.selenium.SearchContext
getSearchContext()
Returns theSearchContext
used for searching forComponent
s.protected org.openqa.selenium.WebElement
getSearchLinkEl()
UserDefinedBucketizationFilter
getTimeLineFilter()
This method only works to interact with filters of User Defined Bucketization Tlv as they can not be handled using normal FilterOverlay methods.boolean
isOpen()
FilterOverlay
open()
java.lang.Boolean
removeDynamicFilter(java.lang.String fieldLabel)
Remove Dynamic Filter by clicking on the cross buttonMethods inherited from class com.onenetwork.platform.tools.test.ui.components.Container
clickAction, clickAction, clickMenuItem, clickOneLogo, createFieldFromLabel, findXTypeFromInput, getActions, getActions, getButton, getCC1InnerTab, getComponent, getDashboard, getFieldByLabel, getFieldByLabelCC15, getFieldByLabelFlux, getFieldByLabelNew, getFieldByMultiLineLabel, getFieldByName, getFieldError, getFilterOverlayPanel, getFormPanel, getGrid, getGridByClass, getGrids, getMenu, getMessagePanel, getMessagePanelFlux, getNotificationCollaboration, getProbelmDetail, getProblemList, getReadOnlyFieldByLabelCC15, getReport, getReports, getSearchPageContext, getTabPanel, getTabPanelByClass, getTemplateDisplay, getTreePanel, getWindow, getWindows, getXTypeFromFormItem, getXTypeFromId, getXTypeFromLabel, isRequired, switchDriver, waitForSuccessMessage
Methods inherited from class com.onenetwork.platform.tools.test.ui.components.Component
getEl, getId, isDisplayed, isRequired
-
Field Details
-
editLinkEl
protected org.openqa.selenium.WebElement editLinkEl -
filterOverlayEl
protected org.openqa.selenium.WebElement filterOverlayEl -
OVERLAY_ID
public static org.openqa.selenium.By OVERLAY_ID -
EDIT_ID
public static org.openqa.selenium.By EDIT_ID -
SEARCH_ID
public static org.openqa.selenium.By SEARCH_ID -
ADD_FILTER_ID
public static org.openqa.selenium.By ADD_FILTER_ID -
CLOSE_ID
public static org.openqa.selenium.By CLOSE_ID -
ERROR_ID
public static org.openqa.selenium.By ERROR_ID -
CLEAR_ID
public static org.openqa.selenium.By CLEAR_ID
-
-
Constructor Details
-
FilterOverlay
The [element] passed in actually represents the filter overlay plugin, because the filter overlay may not have been rendered yet, so you should keep this in mind when subclassing.- Parameters:
context
-element
-
-
-
Method Details
-
getSearchContext
public org.openqa.selenium.SearchContext getSearchContext()Description copied from class:Container
Returns theSearchContext
used for searching forComponent
s. The default implementation returns the element passed into the constructor.- Overrides:
getSearchContext
in classContainer
- Returns:
- See Also:
Container.getSearchContext()
-
isOpen
public boolean isOpen() -
open
-
close
-
executeSearch
public void executeSearch() -
clickDynamicFilterListItem
Adds a dynamic filter field to the overlay and returns a Component if it is not already present Remove the Dynamic filter if already present instance which represents it.- Parameters:
fieldLabel
-- Returns:
-
getDynamicFilterByLabel
Either returns existing filter field by label or adds a dynamic one to the overlay.- Parameters:
fieldLabel
-- Returns:
- filter field composite component
-
removeDynamicFilter
public java.lang.Boolean removeDynamicFilter(java.lang.String fieldLabel)Remove Dynamic Filter by clicking on the cross button- Parameters:
fieldLabel
- = Label of the Dynamic filter- Returns:
-
getFilterOverlayEl
public org.openqa.selenium.WebElement getFilterOverlayEl()Returns the element that represents the filter overlay. If the filter overlay has not been rendered, this method will open it.- Returns:
-
getFilterOverlayEl
protected org.openqa.selenium.WebElement getFilterOverlayEl(boolean forceOpen) -
getSearchLinkEl
protected org.openqa.selenium.WebElement getSearchLinkEl() -
getAddLinkEl
public org.openqa.selenium.WebElement getAddLinkEl() -
clear
public boolean clear()Reset all the Filters- Returns:
- true
-
getErrorMessage
public org.openqa.selenium.WebElement getErrorMessage()To get the Error WebElement Returns null if error message is hidden Returns WebElement if error message is visible- Returns:
-
getFilterSummary
public java.lang.String getFilterSummary()- Returns:
- : Null, IF no Filter has been applied
-
getCloseLinkEl
protected org.openqa.selenium.WebElement getCloseLinkEl() -
getTimeLineFilter
This method only works to interact with filters of User Defined Bucketization Tlv as they can not be handled using normal FilterOverlay methods. It will return an object ofUserDefinedBucketizationFilter
which can be used to further set Bucketization type, filters and dates etc. and execute Tlv.
Typical Usage:
FilterOverlay overlay = tlv.getFilterOverlay();
UserDefinedBucketizationFilter timeLineMenu = overlay.getTimeLineFilter();
((StringEnumerationField)timeLineMenu.getTimeLineFilterOverlay().getFieldByLabel("Bucketization")).select("DAILY");
((DateRangeField) timeLineMenu.getTimeLineFilterOverlay().getFieldByLabel("Date Range")).getFromDateField().setValue("Nov 1,2016")
- Returns:
- UserDefinedBucketizationFilter type object
-
getLink
To get the edit link present on filter overlay Returns Hyperlink component of edit link
-