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

Method cloneNode

src/test/java/org/htmlunit/html/HtmlPageTest.java:1859–1871  ·  view source on GitHub ↗

@exception Exception If the test fails

()

Source from the content-addressed store, hash-verified

1857 * @exception Exception If the test fails
1858 */
1859 @Test
1860 public void cloneNode() throws Exception {
1861 final String html = DOCTYPE_HTML
1862 + "<html>\n"
1863 + "<head><title>foo</title></head>\n"
1864 + "<body>\n"
1865 + "<p>hello world</p>\n"
1866 + "</body></html>";
1867 final HtmlPage page = loadPage(html);
1868 page.getByXPath("//p");
1869 final HtmlPage clonedPage = page.cloneNode(true);
1870 clonedPage.getByXPath("//p");
1871 }
1872
1873 /**
1874 * @exception Exception If the test fails

Callers 7

initMethod · 0.45
typingAndCloneMethod · 0.45
typingAndCloneMethod · 0.45
typingAndCloneMethod · 0.45
typingAndCloneMethod · 0.45
typingAndCloneMethod · 0.45
typingAndCloneMethod · 0.45

Calls 3

cloneNodeMethod · 0.95
loadPageMethod · 0.45
getByXPathMethod · 0.45

Tested by

no test coverage detected