Class FilterOverlay

java.lang.Object

public class FilterOverlay
extends Container
Represents an instance of One.filter.FilterOverlay.
  • 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

      public 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.
      Parameters:
      context -
      element -
  • Method Details

    • getSearchContext

      public org.openqa.selenium.SearchContext getSearchContext()
      Description copied from class: Container
      Returns the SearchContext used for searching for Components. The default implementation returns the element passed into the constructor.
      Overrides:
      getSearchContext in class Container
      Returns:
      See Also:
      Container.getSearchContext()
    • isOpen

      public boolean isOpen()
    • open

      public FilterOverlay open()
    • close

      public FilterOverlay close()
    • executeSearch

      public void executeSearch()
    • clickDynamicFilterListItem

      public CompositeField 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.
      Parameters:
      fieldLabel -
      Returns:
    • getDynamicFilterByLabel

      public CompositeField getDynamicFilterByLabel​(java.lang.String fieldLabel)
      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

      public 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. It will return an object of UserDefinedBucketizationFilter 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

      public Hyperlink getLink​(java.lang.String linkText)
      To get the edit link present on filter overlay Returns Hyperlink component of edit link
      Overrides:
      getLink in class Container
      Returns: