title: handling a popup generated while a file upload box is populated
body: <p>I was looking at the file uploads section in the Watir wiki <a href="http://wiki.openqa.org/display/WTR/File+Uploads" rel="nofollow noreferrer">Watir File Uploads</a></p>
  
  <p>The environment which I am using:</p>
  
  <ul>
  <li>Ruby: 1.8.7 </li>
  <li>Watir: 1.8.1</li>
  </ul>
  
  <p>my code looks like this:</p>
  
  <pre><code>ie = Watir::Browser.start("tinypic.com") 
  ie.file_field(:id, "the_file").set("C:\\image.png")
  </code></pre>
  
  <p>Now, when the file "image.png" does not exist, it produces a popup as shown below
  <img src="https://i.stack.imgur.com/ijG1K.png" alt="Error Popup"> </p>
  
  <p>I tried to use the popup-handlers present in the Javacript popup section on the Wiki, but after debugging, I found out that the set method does not return unless the popup is handled.</p>
  
  <p>What would be a good way to handle it? While searching on Google, I found out somewhere that you could launch a different process in Ruby and try to close the popup window down. If that is the case, can I get some sample code or guidelines as to how to proceed doing the above mentioned thing?</p>
  
  <p>Thanks for any help.</p>