Class AbstractComponent

java.lang.Object
org.primefaces.selenium.AbstractPrimePageFragment
org.primefaces.selenium.component.base.AbstractComponent
All Implemented Interfaces:
org.openqa.selenium.SearchContext, org.openqa.selenium.TakesScreenshot, org.openqa.selenium.WebElement, org.openqa.selenium.WrapsElement
Direct Known Subclasses:
AbstractInputComponent, AbstractMessage, AbstractPageableData, AccordionPanel, BlockUI, Button, CommandButton, ConfirmPopup, Dialog, Link, Messages, OutputLabel, OverlayPanel, Panel, PickList, RadioButton, Schedule, SelectManyCheckbox, SelectOneRadio, Sidebar, SplitButton, TabView, Timeline, Tree

public abstract class AbstractComponent extends AbstractPrimePageFragment
  • Constructor Details

    • AbstractComponent

      public AbstractComponent()
  • Method Details

    • getWidgetByIdScript

      public String getWidgetByIdScript()
      Gets the widget by component id JS function.
      Returns:
      the JS script
    • getWidgetConfigurationAsString

      public String getWidgetConfigurationAsString()
      Gets the current widget's configuration e.g. widget.cfg as a String.
      Returns:
      the String representation of the widget configuration
    • getWidgetConfiguration

      public org.json.JSONObject getWidgetConfiguration()
      Gets the current widget's configuration e.g. widget.cfg as a JSON object.
      Returns:
      the JSONObject representing the config, useful for assertions
    • isAjaxified

      protected boolean isAjaxified(String event)
      Is the event for the root-element AJAXified?
      Parameters:
      event - Event with the `on` prefix, such as `onclick` or `onblur`.
      Returns:
      true if using AJAX false if not
    • isAjaxified

      protected boolean isAjaxified(org.openqa.selenium.WebElement element, String event)
      Is the event AJAXified?
      Parameters:
      element - Element for which to do the check. (May be a child element of a complex component.) If no element is passed it defaults to getRoot().
      event - Event with the `on` prefix, such as `onclick` or `onblur`.
      Returns:
      true is using AJAX false it not
    • destroy

      public void destroy()
      Destroy the widget.