Sha256: cff98d2009c0bfdeaa39151445853569b5113996afcff65dedef4692c5613714
Contents?: true
Size: 709 Bytes
Versions: 7
Compression:
Stored size: 709 Bytes
Contents
# Copyright (C) 2003-2006 Kouichirou Eto, All rights reserved. # This is free software with ABSOLUTELY NO WARRANTY. # You can redistribute it and/or modify it under the terms of the GNU GPL 2. $LOAD_PATH.unshift '..' unless $LOAD_PATH.include? '..' require 'qwik/test-common' #class TestXPath < Test::Unit::TestCase class TestXPath include TestSession 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 end
Version data entries
7 entries across 7 versions & 2 rubygems