title: Feature Testing with Filepicker.io and Capybara
body: <p>I am currently working on feature testing a Filepicker.io upload form and cannot get a the file upload to work. I am using the <a href="https://github.com/jonleighton/poltergeist" rel="nofollow">Poltergeist</a> driver for Capybara and from the debugging I have been able to do, the Filepicker iframe is never loading. I have confirmed this by using the remote debugging of Poltergeist.</p>
  
  <p>Here is a sample of the test code:</p>
  
  <pre class="lang-rb prettyprint-override"><code>within_fieldset 'Photos' do
    click_button 'Find Photo'
  end
  within_frame 'filepicker_dialog' do
    attach_file '#fileUploadInput', Rails.root.join('spec', 'files', 'photo.jpg')
  end
  </code></pre>
  
  <p>And the error being produced:</p>
  
  <pre><code>Failure/Error: within_frame '#filepicker_dialog' do
   Capybara::Poltergeist::TimeoutError:
     Timed out waiting for response to {"name":"push_frame","args":["#filepicker_dialog"]}. It's possible that this happened because something took a very long time (for example a page load was slow). If so, setting the Poltergeist :timeout option to a higher value will help (see the docs for details). If increasing the timeout does not help, this is probably a bug in Poltergeist - please report it to the issue tracker.
  </code></pre>
  
  <p>Attempting to manually trigger Filepicker through the javascript console also yields no results.</p>