Sha256: 587d87a1c7008c09ce3626e24e810664bce489de6c4340edea139d1e04b4a8e6

Contents?: true

Size: 430 Bytes

Versions: 49

Compression:

Stored size: 430 Bytes

Contents

module Watir
  module XpathSupport

    def self.escape(value)
      if value.include? "'"
        parts = value.split("'", -1).map { |part| "'#{part}'" }
        string = parts.join(%{,"'",})

        "concat(#{string})"
      else
        "'#{value}'"
      end
    end

    def self.downcase(value)
      "translate(#{value},'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz')"
    end

  end # XpathSupport
end # Watir

Version data entries

49 entries across 49 versions & 2 rubygems

Version Path
watir-6.13.0 lib/watir/xpath_support.rb
watir-6.12.0 lib/watir/xpath_support.rb
watir-6.11.0 lib/watir/xpath_support.rb
watir-6.11.0.beta2 lib/watir/xpath_support.rb
watir-6.11.0.beta1 lib/watir/xpath_support.rb
watir-6.10.3 lib/watir/xpath_support.rb
watir-6.10.2 lib/watir/xpath_support.rb
watir-6.10.0 lib/watir/xpath_support.rb
watir-6.9.1 lib/watir/xpath_support.rb
watir-6.9.0 lib/watir/xpath_support.rb
watir-6.8.4 lib/watir/xpath_support.rb
watir-6.8.3 lib/watir/xpath_support.rb
watir-6.8.2 lib/watir/xpath_support.rb
watir-6.8.1 lib/watir/xpath_support.rb
watir-6.8.0 lib/watir/xpath_support.rb
watir-6.7.3 lib/watir/xpath_support.rb
watir-6.7.2 lib/watir/xpath_support.rb
watir-6.7.1 lib/watir/xpath_support.rb
watir-6.7.0 lib/watir/xpath_support.rb
watir-6.6.3 lib/watir/xpath_support.rb