mirror of
https://github.com/teamcapybara/capybara.git
synced 2022-11-09 12:08:07 -05:00
Better documentation for temporary driver switching
This commit is contained in:
parent
123cd3bd4a
commit
49a9f17136
1 changed files with 3 additions and 2 deletions
|
@ -175,8 +175,9 @@ tests that require a JavaScript-capable driver using <tt>:js => true</tt> or
|
|||
You can also change the driver temporarily (typically in the Before and After
|
||||
blocks):
|
||||
|
||||
Capybara.current_driver = :culerity
|
||||
Capybara.use_default_driver
|
||||
Capybara.current_driver = :culerity # temporarily select different driver
|
||||
... tests ...
|
||||
Capybara.use_default_driver # switch back to default driver
|
||||
|
||||
Note that switching the driver creates a new session, so you may not be able to
|
||||
switch in the middle of a test.
|
||||
|
|
Loading…
Add table
Reference in a new issue