When a timeout occurs in wait_for, include the HTML from Selenium in the exception
This commit is contained in:
parent
8dacd973aa
commit
f51b745e89
@ -12,6 +12,7 @@ CHANGED: Due to a reorganization, if you're currently requiring "webrat/rspec-ra
|
||||
|
||||
* Minor enhancements
|
||||
|
||||
* When a timeout occurs in wait_for, include the HTML from Selenium in the exception
|
||||
* Update the Merb support to be based directly on Rack (Simon Rozet)
|
||||
* Support multiple select fields (Kieran P)
|
||||
* When locating select options, always match against text, not HTML
|
||||
|
@ -169,7 +169,19 @@ module Webrat
|
||||
sleep 0.25
|
||||
end
|
||||
|
||||
raise Webrat::TimeoutError.new(message + " (after #{timeout} sec)")
|
||||
error_message = "#{message} (after #{timeout} sec)"
|
||||
|
||||
if $browser
|
||||
error_message += <<-EOS
|
||||
|
||||
|
||||
HTML of the page was:
|
||||
|
||||
#{selenium.get_html_source}"
|
||||
EOS
|
||||
end
|
||||
|
||||
raise Webrat::TimeoutError.new(error_message)
|
||||
true
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user