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

John and Pip John and Pip" <pipandjohn@gmail.com
Tue, 17 Apr 2007 01:36:37 +1200


------=_Part_36924_28168909.1176730597186
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Thanks Marc,

re trying to drive 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?

When you posted your reply I was just about to post an email, having just
figured out it was to do with flash myself. Details below:

Simple script:
<webtest name="Air New Zealand home page" >
    <steps>
        <groovy description="don't react on js script errors">
step.context.webClient.throwExceptionOnScriptError = false</groovy>
        <invoke url=" http://www.airnewzealand.co.nz/" ></invoke>
    </steps>
</webtest>

The script above runs fine but the page that is retrieved is (in full):

<HTML><HEAD><TITLE>Checking for the Flash Player</TITLE></HEAD><BODY
BGCOLOR="undefined"><EMBED HIDDEN="true"
TYPE="application/x-shockwave-flash" WIDTH="18" HEIGHT="18"
BGCOLOR="undefined"
SRC="NR/AirNZ/images/flash/detectflash.swf?contentURL=
http://www.airnz.co.nz?&contentVersion=6.0&requireLatestRevision=false&latestRevision=79&upgradeURL=http://www.airnz.co.nz
<http://www.airnz.co.nz/?&contentVersion=6.0&requireLatestRevision=false&latestRevision=79&upgradeURL=http://www.airnz.co.nz>"
LOOP="false" MENU="false"
PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash
"></EMBED></BODY></HTML>

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:

<script language="javascript">
<!--
/*

* Macromedia Flash Dispatcher -- a scriptable detector for Flash Player
* copyright (c) 2000 Macromedia, Inc.
*/

etc

regards,
         John

On 4/17/07, Marc Guillemot <mguillemot@yahoo.fr> wrote:
>
> Hi John,
>
> 2) it seems to be a bug related to following htmlunit issue:
>
> http://sourceforge.net/tracker/index.php?func=detail&aid=1584307&group_id=47038&atid=448266
>
> which occurs here due to the "Checking for the Flash Player" js code.
>
> Marc.
> _______________________________________________
> WebTest mailing list
> WebTest@lists.canoo.com
> http://lists.canoo.com/mailman/listinfo/webtest
>

------=_Part_36924_28168909.1176730597186
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Thanks Marc,<br><br>re trying to drive <a href="http://www.airnewzealand.co.nz/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">www.airnewzealand.co.nz</a> through webtest:<br><br>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?
<br><br>When you posted your reply I was just about to post an email, having just figured out it was to do with flash myself. Details below:<br><br>Simple script: <br>&lt;webtest name=&quot;Air New Zealand home page&quot; &gt;
<br>&nbsp;&nbsp;&nbsp; &lt;steps&gt;
<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;groovy description=&quot;don&#39;t react on js script errors&quot;&gt;step.context.webClient.throwExceptionOnScriptError = false&lt;/groovy&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;invoke url=&quot;<a href="http://www.airnewzealand.co.nz/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">

http://www.airnewzealand.co.nz/</a>&quot; &gt;&lt;/invoke&gt;<br>&nbsp;&nbsp;&nbsp; &lt;/steps&gt;<br>&lt;/webtest&gt;<br><br>The script above runs fine but the page that is retrieved is (in full):<br><br>&lt;HTML&gt;&lt;HEAD&gt;&lt;TITLE&gt;Checking
for the Flash Player&lt;/TITLE&gt;&lt;/HEAD&gt;&lt;BODY
BGCOLOR=&quot;undefined&quot;&gt;&lt;EMBED HIDDEN=&quot;true&quot;
TYPE=&quot;application/x-shockwave-flash&quot; WIDTH=&quot;18&quot; HEIGHT=&quot;18&quot; BGCOLOR=&quot;undefined&quot; SRC=&quot;NR/AirNZ/images/flash/detectflash.swf?contentURL=
<a href="http://www.airnz.co.nz/?&amp;contentVersion=6.0&amp;requireLatestRevision=false&amp;latestRevision=79&amp;upgradeURL=http://www.airnz.co.nz" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://www.airnz.co.nz?&amp;contentVersion=6.0&amp;requireLatestRevision=false&amp;latestRevision=79&amp;upgradeURL=http://www.airnz.co.nz
</a>&quot; LOOP=&quot;false&quot; MENU=&quot;false&quot; PLUGINSPAGE=&quot;<a href="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash
</a>&quot;&gt;&lt;/EMBED&gt;&lt;/BODY&gt;&lt;/HTML&gt;<br><br>I guess I need
to work through the way that the page detects flash to figure out what
might be happening, but thought I&#39;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:
<br><br>&lt;<span>script</span><span> language</span>=<span>&quot;javascript&quot;</span>&gt;<span style="font-family: monospace;"><br></span>&lt;!--	<span style="font-family: monospace;">
<br></span>/*<br><pre>* Macromedia Flash Dispatcher -- a scriptable detector for Flash Player<br>* copyright (c) 2000 Macromedia, Inc.<br>*/</pre>etc<br><br>regards,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; John<br><br><div><span class="gmail_quote">
On 4/17/07, <b class="gmail_sendername">Marc Guillemot</b> &lt;<a href="mailto:mguillemot@yahoo.fr">mguillemot@yahoo.fr</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi John,<br><br>2) it seems to be a bug related to following htmlunit issue:<br><a href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1584307&amp;group_id=47038&amp;atid=448266">http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1584307&amp;group_id=47038&amp;atid=448266
</a><br><br>which occurs here due to the &quot;Checking for the Flash Player&quot; js code.<br><br>Marc.<br>_______________________________________________<br>WebTest mailing list<br><a href="mailto:WebTest@lists.canoo.com">
WebTest@lists.canoo.com</a><br><a href="http://lists.canoo.com/mailman/listinfo/webtest">http://lists.canoo.com/mailman/listinfo/webtest</a><br></blockquote></div><br>

------=_Part_36924_28168909.1176730597186--