1

I am using httpunit. In my application i have an image with just a src and a onclick .A javascript is called on the onclick of the image. It further call a next page. the code snippet is as follows

WebImage image = response.getImageWithSource("abc/xyz.png"); image.getScriptableObject().handleEvent("onclick");

I am not able to get the next page. Can anyone help me out. Thanks in advance.

1 Answers1

0

httpunit has only limites javascript support. Whether your test succeeds depends on the complexity of the script called with the "onclick" event. You might want to check httpunit's Unit testcases for successful examples.

Wolfgang Fahl
  • 15,016
  • 11
  • 93
  • 186