Module: Capybarista::Javascript
- Defined in:
- lib/capybarista/javascript.rb
Class Method Summary collapse
-
.find_xpath(query) ⇒ Object
Generates a fragment of Javascript that will evaluate the specified XPath query.
Class Method Details
.find_xpath(query) ⇒ Object
Generates a fragment of Javascript that will evaluate the specified XPath query.
8 9 10 |
# File 'lib/capybarista/javascript.rb', line 8 def find_xpath(query) %Q{document.evaluate("#{query}", document, null, XPathResult.ANY_TYPE, null ).iterateNext()} end |