public Layout getActiveLayout() {
        List<WebElement> layoutButtons = getLayoutOptionsWebElement().findElements(By.className("ui-button"));
        for (WebElement layoutButton: layoutButtons) {
            WebElement layoutButtonInputHidden = layoutButton.findElement(By.tagName("input"));
            if ("true".equals(layoutButtonInputHidden.getDomProperty("checked"))) {
                if ("list".equals(layoutButtonInputHidden.getDomProperty("value"))) {
                    return Layout.LIST;
                }
                else {
                    return Layout.GRID;
                }
            }
        }

        return null;
    }
Component wrapper for the PrimeFaces {@code p:dataView}.
primefaces-selenium/primefaces-selenium-components/src/main/java/org/primefaces/selenium/component/DataView.java