I have an application where I am trying to upload files. We are using Robot class to do the file upload. The files to be uploaded are selected successfully and should be uploaded after clicking on "Add Files" button. There are other areas in the application where we have the similar file upload functionality and files are uploaded successfully. In one particular area, after clicking on Add Files button, I am getting an error on UI " Technical error has occurred while uploading files". I have read through various resources and tried using Thread.sleep, Explicit Wait with wait.until(expected conditions) but nothing seems to work. Have been stuck here for a while. Same code in other areas of the application uploads the file successfully. This code works fine in debug mode but during run time it clicks on "Add Files" button but fails to actually upload file. Snapshot of code snippet: I have an application where I am trying to uplo