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 'rails/test_help'
require 'test/unit'
require 'rubygems'
require 'selenium-webdriver'
class ExampleTest < Test::Unit::TestCase
attr_reader :browser
def setup
browser = Selenium::WebDriver.for :firefox
browser = Selenium::WebDriver.for :chrome
end
def teardown
@ -16,7 +17,8 @@ class ExampleTest < Test::Unit::TestCase
end
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
end
end