MCPcopy Create free account
hub / github.com/HtmlUnit/htmlunit / xpath

Method xpath

src/test/java/org/htmlunit/xml/XmlPageTest.java:325–335  ·  view source on GitHub ↗

@throws Exception if the test fails

()

Source from the content-addressed store, hash-verified

323 * @throws Exception if the test fails
324 */
325 @Test
326 public void xpath() throws Exception {
327 final String html
328 = "<?xml version=\"1.0\"?>\n"
329 + "<foo>\n"
330 + " <foofoo name='first'>something</foofoo>\n"
331 + " <foofoo name='second'>something else</foofoo>\n"
332 + "</foo>";
333 final XmlPage xmlPage = testDocument(html, MimeType.TEXT_XML);
334 assertEquals(1, xmlPage.getByXPath("//foofoo[@name='first']").size());
335 }
336
337 /**
338 * Test for issue #1820.

Callers 15

firebug-lite.jsFile · 0.45
doTestMethod · 0.45
mooToolsMethod · 0.45
testMethod · 0.45
core_templatesMethod · 0.45
core_spotlightMethod · 0.45
debug_consoleMethod · 0.45
desktop_desktopMethod · 0.45
form_absformMethod · 0.45
form_anchoringMethod · 0.45
grid_bindingMethod · 0.45

Calls 4

testDocumentMethod · 0.95
assertEqualsMethod · 0.45
sizeMethod · 0.45
getByXPathMethod · 0.45

Tested by

no test coverage detected