mirror of
https://github.com/teamcapybara/capybara.git
synced 2022-11-09 12:08:07 -05:00
Update README adding explaination for using app_host to call remote web servers
This commit is contained in:
parent
95a63f8d30
commit
4305776f2e
1 changed files with 17 additions and 4 deletions
13
README.rdoc
13
README.rdoc
|
@ -280,6 +280,19 @@ examples. Just load the dsl and include it anywhere:
|
|||
end
|
||||
click_link 'Sign in'
|
||||
|
||||
== Calling remote servers
|
||||
|
||||
Normally Capybara expects to be testing an in-process Rack application, but you can also use it to talk to a web server running anywhere on the internets, by setting app_host:
|
||||
|
||||
require 'capybara'
|
||||
require 'capybara/dsl'
|
||||
|
||||
include Capybara
|
||||
Capybara.current_driver = :selenium
|
||||
Capybara.app_host = 'http://www.google.com'
|
||||
|
||||
visit('/')
|
||||
|
||||
== Using the sessions manually
|
||||
|
||||
For ultimate control, you can instantiate and use a session manually.
|
||||
|
|
Loading…
Add table
Reference in a new issue