Web Development

Capybara is arguably one of the most used tools in testing in Ruby on Rails. If you need to show the content of the page you are testing, you can use the following command

page.body

This is helpful if you want to see what the problem is with your tests.

There is another really helpful command that you can use.

save_and_open_page
=> #<Process::Waiter:0x007fe07aecbbe0 sleep>

This will open a web browser page and show the content. You wouldn’t see any design here.

Screen shot 2017 04 26 at 8.45.51 pm