Sha256: d293e26ba87e0d3ee789562d55cd71a1ffb207b05f3a7b6022328706e019a123
Contents?: true
Size: 988 Bytes
Versions: 2
Compression:
Stored size: 988 Bytes
Contents
require "test/unit" require "rubygems" require "selenium/client" require "#{File.dirname(__FILE__)}/selenium_config" class Example < Test::Unit::TestCase # include SeleniumConfig def setup @verification_errors = [] @selenium = Selenium::Client::Driver.new \ :host => "localhost", :port => 4444, :browser => "*chrome", :url => "http://www.google.co.nz/", :timeout_in_second => 60 @selenium.start_new_browser_session # Uncomment the line below and delete the 7 lines above to use global selenium config # global_config end def teardown @selenium.close_current_browser_session assert_equal [], @verification_errors end def test_eg @selenium.open "/" @selenium.click "id=lst-ib" @selenium.type "id=lst-ib", "selenium" begin assert @selenium.is_text_present("Selenium - Web Browser Automation") rescue Test::Unit::AssertionFailedError @verification_errors << $! end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
selenium-rake-0.0.2 | lib/selenium/tests/example.rb |
selenium-rake-0.0.1 | lib/tests/example.rb |