Sha256: 75b85110c174ad65555a6bd9762e192fe7fb59fe98d2a16565abb49cb2a9a3f8

Contents?: true

Size: 788 Bytes

Versions: 26

Compression:

Stored size: 788 Bytes

Contents

$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') unless $SETUP_LOADED
require 'unittests/setup'

class TC_Browser < Test::Unit::TestCase
  location __FILE__

  def setup
    uses_page "utf8.html" # could be any page really
  end 

  def test_status_returns_window_status
    browser.execute_script "window.status = 'All done!'"
    assert_match /done/i, browser.status
  end

end

class TC_Browser_Exists < Test::Unit::TestCase
  def setup
    @browser = Watir::Browser.new
    @browser.goto self.class.html_root + "blankpage.html"
  end

  def teardown
    @browser.close if @browser.exists?
  end

  def test_exists
    assert @browser.exists?
  end

  def test_not_exists
    @browser.close
    assert_false @browser.exists?
  end
end


Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
commonwatir-3.0.0.rc3 unittests/browser_test.rb
commonwatir-3.0.0.rc2 unittests/browser_test.rb
commonwatir-3.0.0.rc1 unittests/browser_test.rb
commonwatir-2.0.4 unittests/browser_test.rb
commonwatir-2.0.3 unittests/browser_test.rb
commonwatir-2.0.2 unittests/browser_test.rb
commonwatir-2.0.2.rc1 unittests/browser_test.rb
commonwatir-2.0.1 unittests/browser_test.rb
commonwatir-2.0.0 unittests/browser_test.rb
commonwatir-2.0.0.rc3 unittests/browser_test.rb
commonwatir-2.0.0.rc2 unittests/browser_test.rb
commonwatir-1.9.2 unittests/browser_test.rb
commonwatir-1.9.2.rc1 unittests/browser_test.rb
commonwatir-1.9.1 unittests/browser_test.rb
commonwatir-1.9.1.rc1 unittests/browser_test.rb
commonwatir-1.9.0 unittests/browser_test.rb
commonwatir-1.9.0.rc7 unittests/browser_test.rb
commonwatir-1.9.0.rc6 unittests/browser_test.rb
commonwatir-1.9.0.rc5 unittests/browser_test.rb
commonwatir-1.9.0.rc4 unittests/browser_test.rb