public JSONObject getWidgetConfiguration() {
        String cfg = getWidgetConfigurationAsString();
        if (cfg == null || cfg.length() == 0) {
            return null;
        }
        return new JSONObject(cfg);
    }
Gets the current widget's configuration e.g. widget.cfg as a JSON object.

@return the {@link JSONObject} representing the config, useful for assertions
primefaces-selenium/primefaces-selenium-components/src/main/java/org/primefaces/selenium/component/base/AbstractComponent.java