HtmlUnit doesn't load externally referenced javascript

Posted by nici on Stack Overflow See other posts from Stack Overflow or by nici
Published on 2010-05-17T10:55:58Z Indexed on 2010/05/17 11:01 UTC
Read the original article Hit count: 198

Filed under:
|

I have run into a problem while trying to test a web application with HtmlUnit. Please bear in mind that I haven't used HtmlUnit very long so I might be missing something trivial.

For some reason externally referenced javascripts aren't being loaded. When I print the page as xml all i get is this:

<script language="javascript" src="urltofile.js">  
</script>  

As you can see the script tag is empty when it should contain the javascript. What am I missing? I have googled for a solution all morning but haven't found any relevant information. Any help would be greatly appreciated!

© Stack Overflow or respective owner

Related posts about htmlunit

Related posts about JavaScript