public WebElement getAdvancedCancelButton(String fileName) {
        for (WebElement row : findElements(By.cssSelector(".ui-fileupload-files .ui-fileupload-row"))) {
            WebElement fn = row.findElement(By.cssSelector(".ui-fileupload-filename"));
            if (fn.getText().contains(fileName)) {
                return row.findElement(By.cssSelector("button.ui-fileupload-cancel"));
            }
        }
        throw new NoSuchElementException("cancel button for " + fileName + " not found");
    }
Gets the file Cancel button of the widget.
The button is only rendered in advanced mode.
@param fileName the file name for which to return the cancel button
@return the widget's cancel button
primefaces-selenium/primefaces-selenium-components/src/main/java/org/primefaces/selenium/component/FileUpload.java