๐ Parent Note
๐ค Situation
You want to atach a file to the input tag.
<label for='data-file'>Data File</label>
<input type="file" name="files" id="attach_files">
๐ Usual solution
Capybara::Node::Actions#attach_file
attach_file('data-file', 'path/to/file.csv')
๐ฆ Workaround solution
find('form input[type="file"]').set('path/to/file.csv')
Top comments (0)