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

Marc Guillemot Marc Guillemot <mguillemot@yahoo.fr>
Mon, 16 Apr 2007 18:18:44 +0200

Hi John,

John and Pip wrote:
> Thanks Marc,
> re trying to drive www.airnewzealand.co.nz
> <http://www.airnewzealand.co.nz/> through webtest:
> Thanks Marc for your advice - I would never have figured that out. I
> take it that there is no workaround? Any idea when that defect might be
> fixed? Is our use of flash unusual or to put it another way, do you know
> whether sites with some flash in them usually fail?

the problem is absolutely not related to flash but to a bug in htmlunit
implementation of document.open. In your case this is use for some flash
stuff but this could be for banana or for anything else.
I don't see any workaroud, the simplest is probably to fix it ;-(

> When you posted your reply I was just about to post an email, having
> just figured out it was to do with flash myself. D
> ...
> I guess I need to work through the way that the page detects flash to
> figure out what might be happening, but thought I'd ask here in case
> this is a common issue and someone can advise how I should approach it.
> The page works fine in browsers without flash and it seems to use a
> standard flash detection judging by this below from the page source:

seems that it detects that no flash player is installed and therefore
shows you the page to get it. It is probably a consequence of the
previously mentioned htmlunit bug (new page gets opened when it should
have been written in the current page).
Generally I think that it would be interesting to have the possibility
to configure which plugins htmlunit should say it has. But this isn't
currently possible.
As workaround you could inject custom js script in the page to build the
missing objects. Would be possible for instance with appropriate custom
ScriptPreProcessor. But here again, fixing it is perhaps the faster and
surely the safer way. ;-(