Move verbose selenium output that can clutter build output behind setting

This commit is contained in:
Noah Davis 2010-04-20 11:42:42 -04:00
parent 1979a7fc7f
commit 68d5fde17a
3 changed files with 8 additions and 2 deletions

View File

@ -2,6 +2,7 @@
* Minor enhancements * Minor enhancements
* Move verbose selenium output that can clutter build output behind setting
* Added application_port_for_selenium to webrat configuration. The use case is when you want to test through a web server sitting in front of your application server. (Luke Melia) * Added application_port_for_selenium to webrat configuration. The use case is when you want to test through a web server sitting in front of your application server. (Luke Melia)
* New webrat configuration option selenium_firefox_profile which is passed to selenium server * New webrat configuration option selenium_firefox_profile which is passed to selenium server

View File

@ -72,6 +72,10 @@ module Webrat
# loop? Defaults to 10 # loop? Defaults to 10
attr_accessor :infinite_redirect_limit attr_accessor :infinite_redirect_limit
# Print out the full HTML on wait failure
# Defaults to false
attr_accessor :selenium_verbose_output
def initialize # :nodoc: def initialize # :nodoc:
self.open_error_files = true self.open_error_files = true
self.application_environment = :test self.application_environment = :test
@ -82,6 +86,7 @@ module Webrat
self.infinite_redirect_limit = 10 self.infinite_redirect_limit = 10
self.selenium_browser_key = '*firefox' self.selenium_browser_key = '*firefox'
self.selenium_browser_startup_timeout = 5 self.selenium_browser_startup_timeout = 5
self.selenium_verbose_output = false
tmp_dir = Pathname.new(Dir.pwd).join("tmp") tmp_dir = Pathname.new(Dir.pwd).join("tmp")
self.saved_pages_dir = tmp_dir.exist? ? tmp_dir : Dir.pwd self.saved_pages_dir = tmp_dir.exist? ? tmp_dir : Dir.pwd

View File

@ -176,7 +176,7 @@ module Webrat
error_message = "#{message} (after #{timeout} sec)" error_message = "#{message} (after #{timeout} sec)"
if $browser if $browser && Webrat.configuration.selenium_verbose_output
error_message += <<-EOS error_message += <<-EOS