Sha256: a6c5914254c6d2e9dc959632bd8590e55afdb0da63195c2c5b38661ede6f66f8

Contents?: true

Size: 833 Bytes

Versions: 33

Compression:

Stored size: 833 Bytes

Contents

# defect reproduction

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

class TC_Divs_XPath2 < Test::Unit::TestCase
  def setup
    goto_page "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', browser.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', browser.div(:xpath, "//div[contains(.,'Add') and @class='ButtonText']").text)
  end
  
end

Version data entries

33 entries across 33 versions & 2 rubygems

Version Path
watir-1.9.0.rc4 unittests/div2_xpath_test.rb
watir-1.9.0.rc3 unittests/div2_xpath_test.rb
watir-1.9.0.rc2 unittests/div2_xpath_test.rb
watir-1.9.0.rc1 unittests/div2_xpath_test.rb
watir-1.8.1 unittests/div2_xpath_test.rb
watir-1.8.1.rc1 unittests/div2_xpath_test.rb
watir-1.8.0 unittests/div2_xpath_test.rb
watir-1.8.0.rc1 unittests/div2_xpath_test.rb
watir-1.7.1 unittests/div2_xpath_test.rb
watir-1.7.0 unittests/div2_xpath_test.rb
watir-1.7.0.rc1 unittests/div2_xpath_test.rb
watir-1.6.7 unittests/div2_xpath_test.rb
watir-1.6.7.rc1 unittests/div2_xpath_test.rb