I am using the following code:code runs fine but instead of pasting the path of the file at upload window, it pastes the path on the TestNG console. Does not throw any error and on browser the window pop up remains blank.If someone has faced the same issue then please help me out in it
StringSelection ss= new StringSelection("D:\\test.docx");
Toolkit.getDefaultToolkit().getSystemClipboard().setContents(ss,null);
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);