File Upload using Robot class is failing in IE works fine in Chrome

Hi,

While trying to upload a file it is opening the Windows ‘Choose File to Upload’ window but doesn’t put the Folder path into the ‘File Name’ field. Previously it used to work fine in IE, not sure what stopped it from working. Same code is working fine in Chrome browser, doesn’t work in IE. Anyone had similar problem?

	@Keyword	def uploadFile(TestObject to, String filePath) {		WebUI.click(to)				StringSelection ab = new StringSelection(filePath);		Toolkit.getDefaultToolkit().getSystemClipboard().setContents(ab, null);			Robot robot = new Robot();		robot.keyPress(KeyEvent.VK_ENTER);		robot.keyRelease(KeyEvent.VK_ENTER);				robot.keyPress(KeyEvent.VK_CONTROL);		robot.keyPress(KeyEvent.VK_V);		robot.keyRelease(KeyEvent.VK_V);		robot.keyRelease(KeyEvent.VK_CONTROL);		robot.delay(3000);		robot.keyPress(KeyEvent.VK_ENTER);		robot.keyRelease(KeyEvent.VK_ENTER);}