You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cactus-user@jakarta.apache.org by Jason Stewart <ja...@gmail.com> on 2006/03/31 08:06:59 UTC

problem with httpunit-1.6: Unable to retrieve script included by this response

Hi all,

I've just upgraded to 1.7.2 and I'm testing httpunit integration.

I had trouble with some conflict with including xercesImpl.jar when I
set fork="true", but when forking is disabled XML output works fine.

But now when I try the following:

    public void endWMBrowse(com.meterware.httpunit.WebResponse theResponse)
    {
	try
	{
	    assertTrue(output.indexOf("pantoto-Browse") > 0);
	    WebForm browse = theResponse.getForms()[0];
	    assertTrue(browse != null);
        }
	catch (org.xml.sax.SAXException e)
	{
	    fail("unexpected exception: " + e);
	}
	catch (java.io.IOException e)
	{
	    fail("unexpected exception: " + e);
	}
    }

I get an exception from httpunit:

"Unable to retrieve script included by this response, since it was
loaded by getResource(). Use getResponse() instead."

this appears to be because my webpages have javascript - and httpunit
is fetching the associated scripts and fails.

Any idea how to work around this?

Cheers, jas.