Hi All,
We can upload the file while automating the UI using the robot with the given code lines.
impot java.awt.Robot
WebUI.click(findTestObject(‘object name’))
StringSelection s = new StringSelection(‘file path along with the extenion’)
Toolkit.getDefaultToolkit().getSystemClipboard().setContents(s, null)
Robot robot = new Robot()
robot.keyPress(java.awt.event.KeyEvent.VK_CONTROL)
robot.keyPress(java.awt.event.KeyEvent.VK_V)
Thread.sleep(1000)
robot.keyPress(java.awt.event.KeyEvent.VK_ENTER)