[Webtest] jscript error: loadDates is not a function, it is null, and problem in latest code with com_cenqua_clover/g

Paul King Paul King <paulk@asert.com.au>
Mon, 16 Apr 2007 06:16:29 +1000

There should be plain and clover versions of the jar built.
If you remove clover.jar from your classpath if will automatically
build without clover (only required for measuring our test coverage).


John and Pip wrote:
> Hi,
> A couple of issues I've had today:
> 1) I tried building from source today (pretty new at this) and when I 
> ran the resulting webtest version I got an error: error in taskdef.xml 
> line 22: "A class needed by class 
> com.canoo.webtest.steps.request.ClickButton cannot be found: 
> com_cenqua_clover/g". The previous version that I had also built from 
> source, I think a couple of weeks ago, doesn't give this error. I saw a 
> couple of old posts suggesting this dependancy is optional and I can 
> comment something out in the build, but why did I not have to do that 
> before and what exactly do I do - I'm completely lost? Do I have to take 
> the webtest.jar from [directory I checked source out to]\deploy\clover 
> and use it instead of the one in [directory I checked source out 
> to]build\runtime\lib or something like that?
> 2) I'm having another go at the Air New Zealand home page. With the 
> recent build (from a couple of weeks ago as mentioned above) I can now 
> load www.airnewzealand.co.nz <http://www.airnewzealand.co.nz> if I turn 
> javascript error checking off. Without doing that I get:
>            <failure filename="C:\webtest\doc\isis\testTest.xml" line="7" 
> message="JavaScript error loading page http://www.airnewzealand.co.nz/: 
> TypeError: loadDates is not a function, it is null. (Embedded script in 
> http://www.airnewzealand.co.nz/ <http://www.airnewzealand.co.nz/> from 
> (3141, 32) to (0, 0)#31)">
>                 <detail name="javascript error"><![CDATA[TypeError: 
> loadDates is not a function, it is null. (Embedded script in 
> http://www.airnewzealand.co.nz/ from (3141, 32) to (0, 0)#31)]]></detail>
> [snip]
>     loadDates('', '', '', '',1); 
>     loadDates('h_', "", "", "", 2);
> Neither Firefox 1.5 nor IE 6 has a problem with the page.
> I looked at the javascript for the loadDates function and it all looks 
> normal to me.
> Any idea what might be causing this? Is it because the calls to 
> loadDates are in a div of a form and the function is defined in the head 
> element? With my limited knowledge that doesn't seem wrong. Is it 
> perhaps just that the page has absolute shitloads (technical term) of 
> script both in it and in included js files?
> Thanks for all the ongoing work - webtest just gets better and better.
> regards,
>         John