Module: Watir::XpathSupport
- Included in:
- Container
- Defined in:
- lib/watir-webdriver/xpath_support.rb
Class Method Summary collapse
Class Method Details
.downcase(value) ⇒ Object
16 17 18 |
# File 'lib/watir-webdriver/xpath_support.rb', line 16 def self.downcase(value) "translate(#{value},'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz')" end |
.escape(value) ⇒ Object
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 |