public void selectYear(int year) {
        WebElement panel = showPanel();
        try {
            WebElement yearInput = panel.findElement(By.cssSelector("input.ui-datepicker-year"));
            yearInput.sendKeys(Integer.toString(year));
        }
        catch (NoSuchElementException e) {
            Select yearDropDown = new Select(showPanel().findElement(By.cssSelector("select.ui-datepicker-year")));
            yearDropDown.selectByValue(Integer.toString(year));
        }
    }
Select a year.

@param year the year to select
primefaces-selenium/primefaces-selenium-components/src/main/java/org/primefaces/selenium/component/DatePicker.java