private WebElement findListItem(final WebElement listElement, final String item) {
        final Optional<WebElement> listItem = listElement.findElements(By.tagName("li")).stream().filter(e -> {
            final String value = e.getDomAttribute(ITEM_VALUE_ATTR);
            final String label = e.getDomAttribute(ITEM_LABEL_ATTR);
            return value.equals(item) || label.equals(item);
        }).findFirst();

        if (listItem.isPresent()) {
            return listItem.get();
        }

        throw new NoSuchElementException("Could not find element " + item + " in picklist " + getId());
    }
Finds a list item with either a value or label that matches the input string

@param listElement
@param item the item to find
@return the {@link WebElement} of the item if it is found
@throws NoSuchElementException thrown if the element could not be found
primefaces-selenium/primefaces-selenium-components/src/main/java/org/primefaces/selenium/component/PickList.java