protected boolean isAjaxified(WebElement element, String event) {
        if (element == null) {
            element = getRoot();
        }

        // first check normal path if component is AJAXified
        boolean isAjaxScript = ComponentUtils.isAjaxScript(element.getDomAttribute(event));
        if (isAjaxScript) {
            return true;
        }

        // now check for CSP events
        String id = element.getDomAttribute("id");
        String cspScript = String.format(CSP_SCRIPT, id, event);
        Boolean csp = PrimeSelenium.executeScript(cspScript);
        return csp != null && csp;
    }
Is the event AJAXified?

@param 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().
@param event Event with the `on` prefix, such as `onclick` or `onblur`.
@return true is using AJAX false it not
primefaces-selenium/primefaces-selenium-components/src/main/java/org/primefaces/selenium/component/base/AbstractComponent.java