Struggling to insert an image into the specified input using selenium web-driver.
<input type="file" multiple="multiple" class="dz-hidden-input" accept="image/gif,image/jpg,image/jpeg,image/png,application/zip" style="visibility: hidden; position: absolute; top: 0px; left: 0px; height: 0px; width: 0px;">
Attempting to use sendKeys results in ElementNotVisible: Element is not currently visible due to hidden visibility.
Even trying to set value via JavaScript yielded a web-driver exception stating "The operation is insecure."
A closed issue similar to mine was found here.
Efforts made:
executor.executeScript("arguments[0].style.visibility='visible';",fileInput);
executor.executeScript("arguments[0].style.display='block';", fileInput);
Although attempting to make the element visible, send keys continued failing with the same error.
A similar problem was discovered in this question Uploading a file through selenium but file input element is hidden, however, in my case, the element remains invisible.
Using selenium IDE, it works with the type command.
If anyone has encountered and resolved this issue before, kindly share your experience.
Appreciate any assistance provided.