How can I see what capybara found in a failing cucumber step?

Posted by ajmurmann on Stack Overflow See other posts from Stack Overflow or by ajmurmann
Published on 2010-03-10T01:46:33Z Indexed on 2010/05/14 22:54 UTC
Read the original article Hit count: 264

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?

© Stack Overflow or respective owner

Related posts about cucumber

Related posts about ruby-on-rails