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,AbstractPageableData,AccordionPanel,CommandButton,ConfirmPopup,Dialog,Link,Messages,OutputLabel,OverlayPanel,Panel,Schedule,SelectManyCheckbox,SelectOneRadio,TabView,Timeline,Tree
public abstract class AbstractComponent extends AbstractPrimePageFragment
-
-
Constructor Summary
Constructors Constructor Description AbstractComponent()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetWidgetByIdScript()Gets the widget by component id JS function.org.json.JSONObjectgetWidgetConfiguration()Gets the current widget's configuration e.g.StringgetWidgetConfigurationAsString()Gets the current widget's configuration e.g.protected booleanisAjaxified(String event)Is the event for the root-element ajaxified?protected booleanisAjaxified(org.openqa.selenium.WebElement element, String event)Is the event ajaxified?-
Methods inherited from class org.primefaces.selenium.AbstractPrimePageFragment
getElementLocator, getId, getRoot, getWebDriver, getWrappedElement, setElementLocator, setWebDriver
-
-
-
-
Method Detail
-
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
JSONObjectrepresenting 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
-
-