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-classic-3.0.0 unittests/div2_xpath_test.rb
watir-3.0.0.rc3 unittests/div2_xpath_test.rb
watir-3.0.0.rc2 unittests/div2_xpath_test.rb
watir-3.0.0.rc1 unittests/div2_xpath_test.rb
watir-2.0.4 unittests/div2_xpath_test.rb
watir-2.0.3 unittests/div2_xpath_test.rb
watir-2.0.2 unittests/div2_xpath_test.rb
watir-2.0.2.rc1 unittests/div2_xpath_test.rb
watir-2.0.1 unittests/div2_xpath_test.rb
watir-2.0.0 unittests/div2_xpath_test.rb
watir-2.0.0.rc3 unittests/div2_xpath_test.rb
watir-2.0.0.rc2 unittests/div2_xpath_test.rb
watir-1.9.2 unittests/div2_xpath_test.rb
watir-1.9.2.rc1 unittests/div2_xpath_test.rb
watir-1.9.1 unittests/div2_xpath_test.rb
watir-1.9.1.rc1 unittests/div2_xpath_test.rb
watir-1.9.0 unittests/div2_xpath_test.rb
watir-1.9.0.rc7 unittests/div2_xpath_test.rb
watir-1.9.0.rc6 unittests/div2_xpath_test.rb
watir-1.9.0.rc5 unittests/div2_xpath_test.rb