This adds file drag and drop functionality to Capybara
No jQuery required
Add to your Gemfile:
gem 'dropybara'
Then bundle install
Require it in your tests setup:
require 'dropybara'
It takes similar arguments to attach_file
page.drop_file(css_locator, path, *args)
This uses attach_file
under the hood, as such path
and *args
are passed directly to it.
page.drop_file('.drop-box', File.expand_path('upload.txt'))