HtmlUnit for Java is great but I haven't been able to figure out how to view the full source or return the source of a web site as a string. can anyone help me with this?
I know the follow will read the site but now I just want to return the source to a string.
HtmlPage mySite = webClient.getPage("http://mysite.com");
Thanks!
From looking through the API, my thought would be:
mySite.getWebResponse().getContentAsString();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With