@throws Exception if something goes wrong
()
| 76 | * @throws Exception if something goes wrong |
| 77 | */ |
| 78 | @Test |
| 79 | public void cloneNode() throws Exception { |
| 80 | final String html = DOCTYPE_HTML |
| 81 | + "<html>\n" |
| 82 | + "<head><title>foo</title></head>\n" |
| 83 | + "<body>\n" |
| 84 | + "<p>hello world</p>\n" |
| 85 | + "</body></html>"; |
| 86 | |
| 87 | try (WebClient webClient = new WebClient(getBrowserVersion(), false, null, -1)) { |
| 88 | final HtmlPage page = loadPage(webClient, html, null, URL_FIRST); |
| 89 | |
| 90 | final String org = page.asXml(); |
| 91 | |
| 92 | final HtmlPage clonedPage = page.cloneNode(true); |
| 93 | final String clone = clonedPage.asXml(); |
| 94 | |
| 95 | assertEquals(org, clone); |
| 96 | } |
| 97 | } |
| 98 | |
| 99 | /** |
| 100 | * @throws Exception if something goes wrong |
no test coverage detected