class TestXPath
class TestXPath
< Test::Unit::TestCase
Public Instance Methods
test_xpath()
click to toggle source
# File vendor/qwik/lib/qwik/check-xml-xpath.rb, line 12 def test_xpath t_add_user page = @site.create_new page.store('t') session('/test/1.html') px("//div[@class='section']", 0) require 'xml/xpath' xpath = XML::XPATH.new xpath.xml = @res.body.format_xml.page_to_xml i = xpath.execute("//div[@class='section']/p") print "#{i} nodes :\n" p xpath.to_a end