as long as you don't have a fixed version, you can "locally ignore" the js errors with something like:

<groovy description="don't react on js script errors">
    step.context.webClient.throwExceptionOnScriptError = false
</groovy>
... your page invocation here ...
<groovy description="react on js errors again as this webtest should verify the quality of the application">
    step.context.webClient.throwExceptionOnScriptError = true
</groovy>

Marc.


Colin O'Brien wrote:
Hi Marc,

Thanks for the reply... That menu.js script is some third party stuff
from Liferay so I can't change it myself unfortunately... I will open an
issue with the Liferay guys and see if they are willing to fix it...

Thanks again, regards,
Colin.

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Marc Guillemot
Sent: 07 December 2006 16:08
To: [email protected]
Subject: Re: [Webtest] Script exception with JS Enabled...

Hi Colin,

my Firefox agrees with htmlunit and shows an error too.

Your js is bad:
- document.onmousemove = getMouseXY(event)
-> this try to assign the return value of getMouseXY to the onmousemove handler. This doesn't make sense

- function getMouseXY is defined twice

Marc.

Colin O'Brien wrote:
Hi All,

I get the script exception noted in the included log output 'log.07122006.JS-True.log' (in .zip attached) when javascript is
enabled.
Sample test case included.

Command: ant -buildfile testIncludedJs.xml

Log4j = Debug

Release 2.1 R1443

Exception Summary:

DEBUG (com.canoo.webtest.steps.request.TargetHelper) - ScriptException

occured

======= EXCEPTION START ========

EcmaError: lineNumber=[68] column=[0] lineSource=[ if (e.pageX || e.pageY)] name=[TypeError] sourceName=[file:/C:/canoo/garbage/menu.js]

message=[TypeError: Cannot read property "pageX" from null (file:/C:/canoo/garbage/menu.js#68)]

com.gargoylesoftware.htmlunit.ScriptException: TypeError: Cannot read property "pageX" from null (file:/C:/canoo/garbage/menu.js#68)

...

...

Caused by: org.mozilla.javascript.EcmaError: TypeError: Cannot read property "pageX" from null (file:/C:/canoo/garbage/menu.js#68)

...

...

Enclosed exception:

org.mozilla.javascript.EcmaError: TypeError: Cannot read property "pageX" from null (file:/C:/canoo/garbage/menu.js#68)

Regards,

Colin.

*_________________________________________*

*Colin O'Brien*

*QA Manager*

* *

*CAPE Technologies,*

*Maple House, Temple Road, Blackrock, Co. Dublin*

* *

*e: [EMAIL PROTECTED]

*p: +353 1 4003 900*

*f: +353 1 4003 901*

*w: http://www.capetechnologies.com*

*_________________________________________*


_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest




_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest


_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest

Reply via email to