Skip to content

Instantly share code, notes, and snippets.

@enriclluelles
Created November 30, 2011 17:54
Show Gist options
  • Save enriclluelles/1410015 to your computer and use it in GitHub Desktop.
Save enriclluelles/1410015 to your computer and use it in GitHub Desktop.
Spinach step to test file upload with plupload and the js driver
When 'I add some pictures' do
path = File.expand_path(File.join(Rails.root, 'test', 'fixtures', 'dummy_image.png'))
find("input[type=file]").set(path)
page.execute_script("App.Uploads.uploader.start()")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment