Sha256: 510a796c3d7c160f8abc101c58508df9003b818dc78d20c273656c836990f05c

Contents?: true

Size: 1.04 KB

Versions: 21

Compression:

Stored size: 1.04 KB

Contents

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

class TC_XHTML_Case_Sensitive_Tags < Test::Unit::TestCase
  include Watir::Exception
  location __FILE__

  def setup
    uses_page "a.xhtml"
  end

  def test_html
    # XHTML is case sensitive, so only link 1 is valid.
    # link3 will work if you use ":ID"

    assert browser.link(:id, "link1").exists?, "Could not find link1 by :id"
    assert !browser.link(:id, "link2").exists?, "Found link2 by :id"
    assert !browser.link(:id, "link3").exists?, "Found link3 by :id"
    assert browser.link(:ID, "link3").exists?, "Could not find link3 by :ID"
    assert !browser.link(:id, "link4").exists?, "Found link4 by :id"

    links = browser.links
    assert(links.size == 2, "Links did not find 2 elements")

    links_text = [links[0].text, links[1].text].sort

    assert(links_text[0] == "another lowercase link", "Links did not find link1")
    assert(links_text[1] == "lowercase link", "Links did not find link3")
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
firewatir-1.9.4 unittests/xhtml_case_sensitive_tags_test.rb
firewatir-1.9.3 unittests/xhtml_case_sensitive_tags_test.rb
firewatir-1.9.2 unittests/xhtml_case_sensitive_tags_test.rb
firewatir-1.9.2.rc1 unittests/xhtml_case_sensitive_tags_test.rb
firewatir-1.9.1 unittests/xhtml_case_sensitive_tags_test.rb
firewatir-1.9.1.rc1 unittests/xhtml_case_sensitive_tags_test.rb
firewatir-1.9.0 unittests/xhtml_case_sensitive_tags_test.rb
firewatir-1.9.0.rc7 unittests/xhtml_case_sensitive_tags_test.rb
firewatir-1.9.0.rc6 unittests/xhtml_case_sensitive_tags_test.rb
firewatir-1.9.0.rc5 unittests/xhtml_case_sensitive_tags_test.rb
firewatir-1.9.0.rc4 unittests/xhtml_case_sensitive_tags_test.rb
firewatir-1.9.0.rc3 unittests/xhtml_case_sensitive_tags_test.rb
firewatir-1.9.0.rc2 unittests/xhtml_case_sensitive_tags_test.rb
firewatir-1.9.0.rc1 unittests/xhtml_case_sensitive_tags_test.rb
firewatir-1.8.1 unittests/xhtml_case_sensitive_tags_test.rb
firewatir-1.8.1.rc1 unittests/xhtml_case_sensitive_tags_test.rb
firewatir-1.8.0 unittests/xhtml_case_sensitive_tags_test.rb
firewatir-1.8.0.rc1 unittests/xhtml_case_sensitive_tags_test.rb
firewatir-1.7.1 unittests/xhtml_case_sensitive_tags_test.rb
firewatir-1.7.0 unittests/xhtml_case_sensitive_tags_test.rb