public static Capabilities getCapabilities() {
        WebDriver webDriver = getWebDriver();

        if (webDriver instanceof WebDriverDecorator) {
            WebDriverDecorator driver = (WebDriverDecorator) webDriver;
            webDriver = (WebDriver) driver.getDecoratedDriver().getOriginal();
        }

        if (webDriver instanceof HasCapabilities) {
            return ((HasCapabilities) webDriver).getCapabilities();
        }

        return null;
    }
Get Capabilities of WebDriver.

@return Returns Capabilities of WebDriver
primefaces-selenium/primefaces-selenium-core/src/main/java/org/primefaces/selenium/PrimeSelenium.java