driver.findElement(By.className("browse")).click();
try {
Thread.sleep(3000);
}catch (InterruptedException e){
e.printStackTrace();
}
String fileLocation = System.getProperty("user.dir") + "\\test data\\" + "sample-upload-file.docx";
StringSelection filepath = new StringSelection(fileLocation);
Toolkit.getDefaultToolkit().getSystemClipboard().setContents(filepath, null);
try {
Robot robot = new Robot();
robot.keyPress(KeyEvent.VK_CONTROL);
robot.keyPress(KeyEvent.VK_V);
robot.keyRelease(KeyEvent.VK_V);
robot.keyRelease(KeyEvent.VK_CONTROL);
robot.keyPress(KeyEvent.VK_ENTER);
robot.keyRelease(KeyEvent.VK_ENTER);
} catch (AWTException e) {
e.printStackTrace();
}