Capybara.md Capybara Actions # Anchor click_link 'Save' # Button click_button 'awesome' # Both above click_link_or_button 'Save' # Text (area) field fill_in 'Name', with: 'Content' # Checkbox check 'Content' uncheck 'Content' # Radio button choose 'Content' # Select option from select tag select 'Option', from: 'Label' # File input attach_file Rails.root.join('spec/fixture/some_file.png') Capybara
![Capybara cheatsheet](https://cdn-ak-scissors.b.st-hatena.com/image/square/1ef26f6cb4349557952890dbe3e567f7f98dc151/height=288;version=1;width=512/https%3A%2F%2Fgithub.githubassets.com%2Fassets%2Fgist-og-image-54fd7dc0713e.png)