Module: Watir::XpathSupport

Included in:
Container
Defined in:
lib/watir-webdriver/xpath_support.rb

Class Method Summary (collapse)

Class Method Details

+ (Object) downcase(value)



16
17
18
# File 'lib/watir-webdriver/xpath_support.rb', line 16

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

+ (Object) escape(value)



5
6
7
8
9
10
11
12
13
14
# File 'lib/watir-webdriver/xpath_support.rb', line 5

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

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