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,BlockUI,Button,CommandButton,ConfirmPopup,Dialog,Link,Messages,OutputLabel,OverlayPanel,Panel,PickList,RadioButton,Schedule,SelectManyCheckbox,SelectOneRadio,Sidebar,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 voiddestroy()Destroy the widget.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
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.openqa.selenium.WebElement
clear, click, findElement, findElements, getAccessibleName, getAriaRole, getAttribute, getCssValue, getDomAttribute, getDomProperty, getLocation, getRect, getShadowRoot, getSize, getTagName, getText, isDisplayed, isEnabled, isSelected, sendKeys, submit
-
-
-
-
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
-
destroy
public void destroy()
Destroy the widget.
-
-