From: Brad C. <yo...@br...> - 2005-04-19 21:55:23
|
Depends if you want it before or after HtmlUnit has made any modifications, but this should point you in the right direction: private WebClient getClient() { return this.client; } private Page getCurrentPage() { return getClient().getCurrentWindow().getEnclosedPage(); } public String getCurrentPageAsFixedXml() { final HtmlPage p = (HtmlPage) getCurrentPage(); return p.getDocumentElement().asXml(); } public String getCurrentPageAsRawText() { return getCurrentPage().getWebResponse().getContentAsString(); } Brad C --- "Dantes, Ed" <Ed....@gd...> wrote: > Hello, > I am trying to check what the HTML looks like after I click on a > link, I am able to navigate through the pages, however I am having > difficulty checking to see what the HTML looks like. Already knowing > what it is supposed to look like, I can write an assertEquals(..) but I > do not know what the other parameter would be...What particular class > and method would I used to do this?? > > Thanks > Ed > |