module Capybara
def configure
[javascript_driver = Symbol] The name of a driver to use for JavaScript enabled tests. (Default: :selenium)
[default_driver = Symbol] The name of the driver to use by default. (Default: :rack_test)
when using capybara/dsl, the following options are also available:
=== DSL Options
[server = Symbol] The name of the registered server to use when running the app under test (Default: :webrick)
[threadsafe = Boolean] Whether sessions can be configured individually (Default: false)
[reuse_server = Boolean] Reuse the server thread between multiple sessions using the same app object (Default: true)
[enable_aria_label = Boolean] Whether fields, links, and buttons will match against aria-label attribute (Default: false)
[automatic_label_click = Boolean] Whether Node#choose, Node#check, Node#uncheck will attempt to click the associated label element if the checkbox/radio button are non-visible (Default: false)
[save_path = String] Where to put pages saved through save_(page|screenshot), save_and_open_(page|screenshot) (Default: Dir.pwd)
[automatic_reload = Boolean] Whether to automatically reload elements as Capybara is waiting (Default: true)
[ignore_hidden_elements = Boolean] Whether to ignore hidden elements on the page (Default: true)
[default_max_wait_time = Numeric] The maximum number of seconds to wait for asynchronous processes to finish (Default: 2)
[default_selector = :css/:xpath] Methods which take a selector use the given type by default (Default: :css)
[server_errors = Array\
[raise_server_errors = Boolean] Should errors raised in the server be raised in the tests? (Default: true)
[run_server = Boolean] Whether to start a Rack server for the given Rack app (Default: true)
[asset_host = String] Where dynamic assets are hosted - will be prepended to relative asset locations if present (Default: nil)
[always_include_port = Boolean] Whether the Rack server's port should automatically be inserted into every visited URL unless another port is explicitly specified (Default: false)
[app_host = String/nil] The default host to use when giving a relative URL to visit, must be a valid URL e.g. http://www.example.com
=== Configurable options
end
config.app_host = 'http://www.google.com'
config.run_server = false
Capybara.configure do |config|
Configure Capybara to suit your needs.
#
def configure yield config end