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.0.0.beta4 lib/watir/xpath_support.rb
watir-6.0.0.beta3 lib/watir/xpath_support.rb
watir-6.0.0.beta2 lib/watir/xpath_support.rb
watir-6.0.0.beta1 lib/watir/xpath_support.rb
watir-webdriver-0.9.3 lib/watir-webdriver/xpath_support.rb
watir-webdriver-0.9.2 lib/watir-webdriver/xpath_support.rb
watir-webdriver-0.9.1 lib/watir-webdriver/xpath_support.rb
watir-webdriver-0.9.0 lib/watir-webdriver/xpath_support.rb
watir-webdriver-0.8.0 lib/watir-webdriver/xpath_support.rb