Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Updated README to make driver registration and configuration more clear.

  • Loading branch information...
1 parent 5e1d159 commit 1edd6e5da9f41d02b1944149851b25ec4e64c210 @eprothro eprothro committed
Showing with 8 additions and 4 deletions.
  1. +8 −4
@@ -271,7 +271,7 @@ RackTest can be configured with a set of headers like this:
Capybara.register_driver :rack_test do |app|
-, :headers => { 'User-Agent' => 'Capybara' })
+, :headers => { 'HTTP_USER_AGENT' => 'Capybara' })
@@ -794,7 +794,7 @@ end
Capybara makes it convenient to switch between different drivers. It also exposes
an API to tweak those drivers with whatever settings you want, or to add your own
-drivers. This is how to switch the selenium driver to use chrome:
+drivers. This is how to override the selenium driver configuration to use chrome:
Capybara.register_driver :selenium do |app|
@@ -802,8 +802,7 @@ Capybara.register_driver :selenium do |app|
-However, it's also possible to give this a different name, so tests can switch
-between using different browsers effortlessly:
+However, it's also possible to give this configuration a different name.
Capybara.register_driver :selenium_chrome do |app|
@@ -811,6 +810,11 @@ Capybara.register_driver :selenium_chrome do |app|
+Then tests can switch between using different browsers effortlessly:
+Capybara.current_driver = :selenium_chrome
Whatever is returned from the block should conform to the API described by
Capybara::Driver::Base, it does not however have to inherit from this class.
Gems can use this API to add their own drivers to Capybara.

0 comments on commit 1edd6e5

Please sign in to comment.
Something went wrong with that request. Please try again.