Skip to content

Instantly share code, notes, and snippets.

@VirtuosiMedia
Created February 17, 2012 22:08
Show Gist options
  • Save VirtuosiMedia/1855717 to your computer and use it in GitHub Desktop.
Save VirtuosiMedia/1855717 to your computer and use it in GitHub Desktop.
Client RSpec
require "rubygems"
gem "rspec"
gem "selenium-client"
require "selenium/client"
require "selenium/rspec/spec_helper"
require "spec/test/unit"
describe "Find Pricing Page" do
attr_reader :selenium_driver
alias :page :selenium_driver
before(:all) do
@verification_errors = []
@selenium_driver = Selenium::Client::Driver.new \
:host => "localhost",
:port => 4444,
:browser => "*chrome",
:url => "http://staging.youeye.com/",
:timeout_in_second => 60
end
before(:each) do
@selenium_driver.start_new_browser_session
end
append_after(:each) do
@selenium_driver.close_current_browser_session
@verification_errors.should == []
end
it "test_find _pricing _page" do
page.open "/"
page.click "link=Pricing"
page.wait_for_page_to_load "30000"
("http://staging.youeye.com/pricing").should == page.get_location
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment