Module: Watir::XpathSupport
- Included in:
- Container
- Defined in:
- lib/watir-webdriver/xpath_support.rb
Class Method Summary collapse
Class Method Details
.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 |