There is an upload field but its not an input type, Sendkeys and JS executor does not work there.
Robot class worked perfectly but since this might fail on diff screen resolutions so would want to avoid any third party and check for a different automation approach using selenium methods.
Tried sendkeys and below code but it did not work-
WebDriverWait wait = new WebDriverWait(getDriver(), Duration.ofSeconds(10));
WebElement chooseFile = wait.until(ExpectedConditions.presenceOfElementLocated(By.id("FileUpload1")));
JavascriptExecutor js = (JavascriptExecutor) getDriver();
js.executeScript("arguments[0].style.visibility='visible'", chooseFile);
chooseFile.sendKeys(path);`
js.executeScript("arguments[0].click();", uploadBtn);