title: Selenium Hidden File upload in Drag Drop UI
body: <p>I am trying to add image in the following input using selenium web-driver.</p>
  
  <pre><code>&lt;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;"&gt;
  </code></pre>
  
  <p>When used sendKeys it gives ElementNotVisible: Element is not currently visible as visibility is hidden.</p>
  
  <p>Tried to execute using Java script set value it gave web-driver exception saying "The operation is insecure." </p>
  
  <p>I found <a href="http://code.google.com/p/selenium/issues/detail?id=5064" rel="nofollow noreferrer">this</a> closed issue similar to mine.</p>
  
  <p>Tried :</p>
  
  <pre><code>executor.executeScript("arguments[0].style.visibility='visible';",fileInput);
  
  executor.executeScript("arguments[0].style.display='block';", fileInput);
  </code></pre>
  
  <p>To enable the visibility but send keys failed with same error.</p>
  
  <p>I found similar question <a href="https://stackoverflow.com/questions/15095601/uploading-a-file-through-selenium-but-file-input-element-is-hidden">Uploading a file through selenium but file input element is hidden</a> but my element never becomes visible.</p>
  
  <p>I tried with selenium IDE its working with type command.</p>
  
  <p>Please let me know if any one has faced same issue and how it got fixed.</p>
  
  <p>Thanks in Advance</p>