Sha256: eaa161ed23287e3c8ad8a3a4a57b7e69fdc382ccdda790b019a663faa81bea2e

Contents?: true

Size: 864 Bytes

Versions: 3

Compression:

Stored size: 864 Bytes

Contents

# defect reproduction
# revision: $Revision: 958 $

$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') if $0 == __FILE__
require 'unittests/setup'

class TC_Divs_XPath2 < Test::Unit::TestCase
  def setup
    $ie.goto($htmlRoot + "list_matters.html")
  end
  def test_div_with_text
    # Note: this test fails, probably because of bad html to xml translation.
    # However... the same xpath expression finds the right object in Selenium!
    assert_equal('Add', $ie.div(:xpath, "//div[text()='Add' and @class='ButtonText']").text)
  end
    def test_div_with_contains
    # Note: this test fails, probably because of bad html to xml translation.
    # However... the same xpath expression finds the right object in Selenium!
    assert_equal('Add', $ie.div(:xpath, "//div[contains(.,'Add') and @class='ButtonText']").text)
  end
  
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
watir-1.5.3 unittests/div2_xpath_test.rb
watir-1.5.4 unittests/div2_xpath_test.rb
watir-1.5.2 unittests/div2_xpath_test.rb