1
0
Fork 0
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:
Joseph Wilk and Matt Wynne 2010-02-03 12:18:20 +00:00
parent 95a63f8d30
commit 4305776f2e

View file

@ -280,6 +280,19 @@ examples. Just load the dsl and include it anywhere:
end end
click_link 'Sign in' 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 == Using the sessions manually
For ultimate control, you can instantiate and use a session manually. For ultimate control, you can instantiate and use a session manually.