changed UI test
This commit is contained in:
parent
c39f258f50
commit
26efed71cc
1 changed files with 4 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue