Class AbstractComponent

    • Constructor Detail

      • AbstractComponent

        public AbstractComponent()
    • 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 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.