Search code examples
ruby-on-railscucumberwebrat

Debug output from webrat


Are there any ways to see debug output from webrat on failed steps?

For example I get the following error:

The 'Test User' option was not found in the "user_id" select box (Webrat::NotFoundError)

I want to see HTML output that webrat is seeing, to figure out, where is the problem.


Solution

  • Ok, i figured it out myself. Webrat has save_and_open_page method, it saves HTML page to tmp/ dir and opens it in browser.