From: Ahmed A. <asa...@ya...> - 2014-01-05 07:19:10
|
Hi Andrew, Can you provide your complete case, as the below works with me. HtmlPage page = webClient.getPage("file://c://use//=.html"); System.out.println(page.asText()); Ahmed ________________________________ From: Andrew Pennebaker <ape...@42...> To: HtmlUnit Users <htm...@li...> Sent: Friday, January 3, 2014 9:39 PM Subject: [Htmlunit-user] HtmlUnit can't load "%3d" ("=") in file:/... URIs I'm trying to use local test resource .html pages in my unit tests, rather than reaching out to the live, fluctuating Internet. Some of my test pages have equals (=) in their filenames, which ClassLoader.getSystemResource().toString() encodes as "%3d" in the resulting URI string. Trouble is, HtmlUnit WebClient can't retrieve encoded URIs, so my unit tests are giving false negatives. For now, I'm manually decoding the URIs before passing them to WebClient. In the future, could WebClient please automatically decode URIs? -- Cheers, Andrew Pennebaker ape...@42... ------------------------------------------------------------------------------ Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk _______________________________________________ Htmlunit-user mailing list Htm...@li... https://lists.sourceforge.net/lists/listinfo/htmlunit-user |