Class: Webrat::Configuration
Overview
Instance Attribute Summary collapse
-
#application_address ⇒ Object
Which server the application is running on for selenium testing? Defaults to localhost.
-
#application_environment ⇒ Object
Which rails environment should the selenium tests be run in? Defaults to selenium.
-
#application_framework ⇒ Object
Which underlying app framework we’re testing with selenium.
-
#application_port ⇒ Object
Which port is the application running on for selenium testing? Defaults to 3001.
-
#infinite_redirect_limit ⇒ Object
How many redirects to the same URL should be halted as an infinite redirect loop? Defaults to 10.
-
#mode ⇒ Object
Webrat’s mode, set automatically when requiring webrat/rails, webrat/merb, etc.
-
#open_error_files ⇒ Object
writeonly
Save and open pages with error status codes (500-599) in a browser? Defualts to true.
-
#parse_with_nokogiri ⇒ Object
writeonly
Should XHTML be parsed with Nokogiri? Defaults to true, except on JRuby.
-
#selenium_browser_key ⇒ Object
Set the key that Selenium uses to determine the browser running.
-
#selenium_browser_startup_timeout ⇒ Object
Set the timeout for waiting for the browser process to start.
-
#selenium_server_address ⇒ Object
Which server Selenium server is running on.
-
#selenium_server_port ⇒ Object
Which server Selenium port is running on.
-
#selenium_timeout ⇒ Object
Set the default timeout for selenium waits.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
:nodoc:.
-
#open_error_files? ⇒ Boolean
:nodoc:.
-
#parse_with_nokogiri? ⇒ Boolean
:nodoc:.
Constructor Details
#initialize ⇒ Configuration
:nodoc:
67 68 69 70 71 72 73 74 75 76 77 78 79 |
# File 'lib/webrat/core/configuration.rb', line 67 def initialize # :nodoc: self.open_error_files = true self.parse_with_nokogiri = true self.application_environment = :test self.application_port = 3001 self.application_address = 'localhost' self.application_framework = :rails self.selenium_server_port = 4444 self.infinite_redirect_limit = 10 self.selenium_browser_key = '*firefox' self.selenium_browser_startup_timeout = 5 self.selenium_timeout = 5 end |
Instance Attribute Details
#application_address ⇒ Object
Which server the application is running on for selenium testing? Defaults to localhost
46 47 48 |
# File 'lib/webrat/core/configuration.rb', line 46 def application_address @application_address end |
#application_environment ⇒ Object
Which rails environment should the selenium tests be run in? Defaults to selenium.
33 34 35 |
# File 'lib/webrat/core/configuration.rb', line 33 def application_environment @application_environment end |
#application_framework ⇒ Object
Which underlying app framework we’re testing with selenium
43 44 45 |
# File 'lib/webrat/core/configuration.rb', line 43 def application_framework @application_framework end |
#application_port ⇒ Object
Which port is the application running on for selenium testing? Defaults to 3001.
38 39 40 |
# File 'lib/webrat/core/configuration.rb', line 38 def application_port @application_port end |
#infinite_redirect_limit ⇒ Object
How many redirects to the same URL should be halted as an infinite redirect loop? Defaults to 10
65 66 67 |
# File 'lib/webrat/core/configuration.rb', line 65 def infinite_redirect_limit @infinite_redirect_limit end |
#mode ⇒ Object
Webrat’s mode, set automatically when requiring webrat/rails, webrat/merb, etc.
27 28 29 |
# File 'lib/webrat/core/configuration.rb', line 27 def mode @mode end |
#open_error_files=(value) ⇒ Object (writeonly)
Save and open pages with error status codes (500-599) in a browser? Defualts to true.
30 31 32 |
# File 'lib/webrat/core/configuration.rb', line 30 def open_error_files=(value) @open_error_files = value end |
#parse_with_nokogiri=(value) ⇒ Object (writeonly)
Should XHTML be parsed with Nokogiri? Defaults to true, except on JRuby. When false, Hpricot and REXML are used
24 25 26 |
# File 'lib/webrat/core/configuration.rb', line 24 def parse_with_nokogiri=(value) @parse_with_nokogiri = value end |
#selenium_browser_key ⇒ Object
Set the key that Selenium uses to determine the browser running. Default *firefox
55 56 57 |
# File 'lib/webrat/core/configuration.rb', line 55 def selenium_browser_key @selenium_browser_key end |
#selenium_browser_startup_timeout ⇒ Object
Set the timeout for waiting for the browser process to start
58 59 60 |
# File 'lib/webrat/core/configuration.rb', line 58 def selenium_browser_startup_timeout @selenium_browser_startup_timeout end |
#selenium_server_address ⇒ Object
Which server Selenium server is running on. Defaults to nil(server starts in webrat process and runs locally)
49 50 51 |
# File 'lib/webrat/core/configuration.rb', line 49 def selenium_server_address @selenium_server_address end |
#selenium_server_port ⇒ Object
Which server Selenium port is running on. Defaults to 4444
52 53 54 |
# File 'lib/webrat/core/configuration.rb', line 52 def selenium_server_port @selenium_server_port end |
#selenium_timeout ⇒ Object
Set the default timeout for selenium waits
61 62 63 |
# File 'lib/webrat/core/configuration.rb', line 61 def selenium_timeout @selenium_timeout end |
Instance Method Details
#open_error_files? ⇒ Boolean
:nodoc:
85 86 87 |
# File 'lib/webrat/core/configuration.rb', line 85 def open_error_files? #:nodoc: @open_error_files ? true : false end |
#parse_with_nokogiri? ⇒ Boolean
:nodoc:
81 82 83 |
# File 'lib/webrat/core/configuration.rb', line 81 def parse_with_nokogiri? #:nodoc: @parse_with_nokogiri ? true : false end |