How to display URL and full HTML on error

4 views
Skip to first unread message

steven_noble

unread,
Oct 30, 2009, 5:13:34 AM10/30/09
to webrat
Currently when a webrat step does not pass, it shows the error and
text content of the current web page.

I would like to also see the URL and full HTML of the current web
page.

Is this possible?

Steven.

Matt Wynne

unread,
Oct 31, 2009, 10:43:38 AM10/31/09
to web...@googlegroups.com
Use #save_and_open page to see the full HTML in a browser. Otherwise
you can write your own function to dump #current_dom to the output of
your choice.

For the URL I think you use request.current_url - just look at the
docs for Rails' ActionController::IntegrationTest - assuming you're
using Rails that is.
cheers,
Matt

http://mattwynne.net
+447974 430184

Reply all
Reply to author
Forward
0 new messages