You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
testingbot edited this page Apr 9, 2012
·
1 revision
To run Selenium tests on your Rails code with RSpec you will need to install the rspec-rails gem. If you use Capybara a rack server will be started at the beginning of your test.
require'spec_helper'TestingBot::configdo|config|config[:desired_capabilities] = { :browserName=>"firefox", :version=>9, :platform=>"WINDOWS", :localhost=>"YES" }
config.require_tunnel# need a tunnel to run a localhost testenddescribe'home page'dobefore:alldoCapybara.server_port = 3011Capybara.current_driver = :testingbotCapybara.app_host = "http://127.0.0.1:3011"endit"shows the home page", :type=>:requestdovisit'/'page.shouldhave_content('Selenium')
endend