title: Set <input type="file"> value in Firefox Add-on with javascript
body: <p>I have the following scenario in front of me:</p>
  
  <p>I am using Selenium to drive my browser to fill a few forms, which works really well.</p>
  
  <p>Now I am at the point, where I also want to upload files via the given webform (can't change how it's processed, can only manipulate the Javascript/HTML/DOM). As I have found out, for security reasons the file upload window pops up right away, when clicking into the  field. And also manipulation via normal Javascript isn't possible. Makes sense as well...</p>
  
  <p>I have found out though, that a Firefox Add-On is supposed to be able to do this. The closest I have come to an answer is <a href="https://stackoverflow.com/questions/10510593/browser-auto-select-file-through-file-input-tag-via-browser-extension">another Stack Overflow thread on this topic</a>. If I got this working for me, that would be awesome! :-) But unfortunately I didn't, yet...</p>
  
  <p>Minimal example:</p>
  
  <pre><code>&lt;form method="post" url="http://www.example.com"&gt;
  &lt;input type="file" id="fileInput"/&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>when calling (from the console in Firebug) </p>
  
  <pre><code>document.getElementById('fileInput').value = "C:\\image.png";
  </code></pre>
  
  <p>in get "Error: The operation is insecure." which is what I expect.</p>
  
  <p>When calling the same in a contentScriptFile in a Firefox Add-On (I am using the add-on builder to create it) the script simply breaks without an error. My indicator for that is, that I do see the alerts before, but none after that line</p>
  
  <p>Now the question is not so much why I don't get an error, but:<br>
  1. Am I on the right track? Is this supposed to work?<br>
  2. How do I make this work? I am not sure whether the mentioning of the "chrome authority" in the above link is relevant for me. Do I have to extend the scripts privileges somehow? If so, how?</p>
  
  <p>Thank you!<br>
  Sandro</p>
  
  <p>P.S. When I tried to set the value via jQuery, Firefox crashed completely. <br>
  P.P.S. At the moment this is only supposed to work on my personal machine, cross browser issues or similar things thus aren't relevant</p>