public void setValue(Serializable value, boolean useGuard) {
        Runnable runnable = () -> {
            if (getInput() != this && !PrimeSelenium.isChrome()) {
                // input file cannot be cleared if skinSimple=false or in Chrome
                getInput().clear();
            }
            // ComponentUtils.sendKeys will break tests in Chrome
            getInput().sendKeys(value.toString());

            PrimeSelenium.wait(200);
        };

        if (isAutoUpload()) {
            if (useGuard) {
                if (isAdvancedMode()) {
                    Runnable guarded = Guard.custom(
                            runnable,
                            200,
                            ConfigProvider.getInstance().getTimeoutFileUpload(),
                            PrimeExpectedConditions.script("return " + getWidgetByIdScript() + ".files.length === 0;"));

                    guarded.run();
                }
                else {
                    PrimeSelenium.guardAjax(runnable).run();
                }
            }
            else {
                runnable.run();
            }
        }
        else {
            runnable.run();
        }
    }
Sets the input's value.
This should be the files absolute path.
@param value the file name to
@param useGuard use guard to wait until the upload finished
primefaces-selenium/primefaces-selenium-components/src/main/java/org/primefaces/selenium/component/FileUpload.java