views:

343

answers:

2

I started migrating from cucumber + webrat to cucumber + capybara. Now the behavior of "I should see " seems to be somewhat different. Most of these fail now, although I didn't change anything on the page. I replaced the snippet that should be found with some stuff that is on every page and for some text it works and for other text it doesn't. I can't find any pattern in what is found in the page's content and what is not. Webrat used to print what the page content is that it found, in case it did not contain the required phrase. Is there anyway to have capybara show what text it got from the page in which it tried to find the text?

+2  A: 

Try adding this step:

Then show me the page
marcgg
Thank you very much! This helped a lot!
ajmurmann
+2  A: 

You could also use "Then show me the response" which outputs the HTML to the console if you don't want to use a browser.

kinet