From: David D.K. <ddk...@ki...> - 2005-01-19 14:19:39
|
David, You'll need to download the source, or check it out from CVS. The test code is not distributed with the htmlunit jar (IIRC). Dave On Jan 19, 2005, at 3:51 AM, Marc Guillemot wrote: > The MockWebConnection can do exactly that. Have a look at htmlunit > unit tests: they use it intensively. > > Marc. > > David Ko wrote: >> Hi, >> I am new to htmlunit. I am wondering if there is a >> work around for me to pass in the html (as String or >> some other form) to WebClient.getPage( ... ) instead >> of passing in a URL. >> At the time of testing I am geneating a html page and >> want to test the form and javascript. What I can do is >> save the content of the html to file and set the URL >> to the saved file and pass it in to >> webclient.getPage(URL). But I would like to avoid >> expensive io :) >> Thanks in advance, >> David > |