I have implemented a method for uploading a file to a read-only input field. But when press the OK button, the attachment is Null. Interface Developed by using EXTjs.
public void uploadMyFile(String locatorId, String filePath) {
WebElement fileInput = findElementExplicitWaitWithNoVisbility(By.id(locatorId), true);
((JavascriptExecutor) driverProvider.get()).executeScript(
"arguments[0].removeAttribute('readonly','readonly')",fileInput);
fileInput.clear();
fileInput.sendKeys(filePath);
}