public WebElement findMenuitemByValue(WebElement parentElt, String value) {
        List<WebElement> subElements = parentElt.findElements(By.cssSelector("ul > li.ui-menuitem"));
        return subElements.stream()
                .filter(e -> e.getText().equals(value))
                .findFirst()
                .orElseThrow(() -> new NoSuchElementException("no menuitem with value '" + value + "'"));
    }
Component wrapper for the PrimeFaces {@code p:menubar}.
primefaces-selenium/primefaces-selenium-components/src/main/java/org/primefaces/selenium/component/Menubar.java