All of the examples I see for htmlunit retrieve the HTML from website via a URL using getPage.
WebClient webClient = new WebClient();
HtmlPage page = webClient.getPage("http://htmlunit.sourceforge.net");
I'm holding an HTML fragment in a string variable and can't find a way to give it the HTML from a variable.
I've tried casting the String to HtmlPage but that doesn't work.
HtmlPage page = (HtmlPage) htmlFragment