capey - 2004-05-27

I'm using Cactus 1.5 and HttpUnit 1.5.4, on Tomcat 4.1 (hosted by Borland Enterprise Server 5.0.2)

When using Cactus to test, using the HttpUnit WebResponse in the endXXX method, if the page being tested has an included script any one of the calls such as getTables(), getForms() etc results in a NullPointerException.

Cactus creates the WebResponse object through reflection, not a WebClient, so the updateMainWindow() method is not called, and the _window private member is not set. This results in the NullPointerException when calling anything that does a loadResources() as this results in a call to getIncludedScript().

Can anyone suggest a way I can somehow get the updateMainWindow() method to be called from within my TestCase to ensure that the _window variable, and others, are set?