changed UI test

This commit is contained in:
roy 2012-11-12 19:57:28 +01:00
parent c39f258f50
commit 26efed71cc

View file

@ -2,13 +2,14 @@ ENV["RAILS_ENV"] = "test"
require File.expand_path('../../config/environment', __FILE__) require File.expand_path('../../config/environment', __FILE__)
require 'rails/test_help' require 'rails/test_help'
require 'test/unit' require 'test/unit'
require 'rubygems'
require 'selenium-webdriver' require 'selenium-webdriver'
class ExampleTest < Test::Unit::TestCase class ExampleTest < Test::Unit::TestCase
attr_reader :browser attr_reader :browser
def setup def setup
browser = Selenium::WebDriver.for :firefox browser = Selenium::WebDriver.for :chrome
end end
def teardown def teardown
@ -16,7 +17,8 @@ class ExampleTest < Test::Unit::TestCase
end end
def test_page_search def test_page_search
browser.navigate_to "http://www.google.com" browser.get "http://www.google.com"
puts "Page title is #{browser.title}"
assert_equal "Google", browser.title assert_equal "Google", browser.title
end end
end end