

If using Rails 5.0+, but not using the Rails system tests from 5.1, you'll probably also If you need to test JavaScript, or if your app interacts with (or is located at)Ī remote URL, you'll need to use a different driver. If the application that you are testing is a Rack app, but not Rails, set Capybara.app to your Rack app: Capybara. If the application that you are testing is a Rails app, add this line to your test helper file: require ' capybara/rails ' Gemfile and run bundle install: gem ' capybara ' Powerful synchronization features mean you never have to manually waitĬapybara requires Ruby 2.7.0 or later.To an actual browser with no changes to your tests. Switch the backend your tests run against from fast headless mode.Intuitive API which mimics the language an actual user would use.No setup necessary for Rails and Rack application.Asynchronous JavaScript (Ajax and friends).Need help? Ask on the mailing list (please do not open an issue on If you and/or your company find value in Capybara and would like to contribute financially to its ongoing maintenance and development, please visit It is agnostic about the driver running your tests andĬomes with Rack::Test and Selenium support built in.

Capybara helps you test web applications by simulating how a real user would
