Sha256: 7eb1f2aad538c4b6008ec745d6181cd585aaeef3f4ab5fdb330d5c48e4a716e8

Contents?: true

Size: 1.14 KB

Versions: 10

Compression:

Stored size: 1.14 KB

Contents

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

class TC_MultipleSpecifiers < Test::Unit::TestCase
  include Watir::Exception
  
  def setup
    goto_page "multiple_specifiers.html"
  end

  %w[form table cell row button file_field text_field
     hidden select_list checkbox radio link image element div].each do |element|
    class_eval %Q{
      def test_#{element} 
        assert "one", browser.#{element}(:name => "test#{element}", :class => "one").class_name
        assert "two", browser.#{element}(:name => "test#{element}", :class => "two").class_name
        assert_raises(UnknownObjectException) {browser.#{element}(:name => "nonexistent", :class => "one").class_name}      
      end
    }
  end

  def test_frame
    goto_page "frame_buttons.html"
    assert "buttons1.html", browser.frame(:name => /buttonFrame/, :src => "buttons1.html").src
    assert "blankpage.html", browser.frame(:name => /buttonFrame/, :src => "blankpage.html").src
    assert_raises(UnknownObjectException) {browser.frame(:name => "nonexistent", :src => "buttons1.html").src}      
  end

end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
watir-3.0.0.rc2 unittests/multiple_specifiers_test.rb
watir-3.0.0.rc1 unittests/multiple_specifiers_test.rb
watir-2.0.4 unittests/multiple_specifiers_test.rb
watir-2.0.3 unittests/multiple_specifiers_test.rb
watir-2.0.2 unittests/multiple_specifiers_test.rb
watir-2.0.2.rc1 unittests/multiple_specifiers_test.rb
watir-2.0.1 unittests/multiple_specifiers_test.rb
watir-2.0.0 unittests/multiple_specifiers_test.rb
watir-2.0.0.rc3 unittests/multiple_specifiers_test.rb
watir-2.0.0.rc2 unittests/multiple_specifiers_test.rb