Not able to upload file using sendKeys() – Please help
- I tried setting visibility to true using java script executor, it did not helped.
- Used Actions class to focus element and then sendKeys(), its also not working .
- Used thread.sleep(0 and expected condition to wait for visibility of element but nothing is helping. In html attached, i did not find any attribute set to hidden
you Can also use java awt Robot to upload a file using selenium
Please find the below code
StringSeclectio sel = new StringSelection(path of the file)
Robot robot = new Robot();
// Release Enter
// Release CTRL+V
// Press Enter
This can be useful please try it once