[Webtest] addEventListener is not a function?
Samuel B. Quiring
webtest@lists.canoo.com
Wed, 15 Mar 2006 09:36:28 -0800
This is a multi-part message in MIME format.
------=_NextPart_000_01A2_01C64813.EF25FAE0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
I have received an error message than I cannot interpret. I am hoping =
that someone on the list
can explain this to me.
Here is an excerpt from my log:
. . .
[clickButton] INFO (com.canoo.webtest.steps.Step) - Exception thrown =
from this class: com.canoo.webtest.engine.StepFailedException
[clickButton] INFO (com.canoo.webtest.steps.Step) - Message was: =
Step[clickButton "Click the login button" (4/5)]: Script error loading =
page executing webtest at: clickButton TypeError: addEventListener is =
not a function, it is null. =
(http://dev.cayuse.com:8081/V8/jslib/boxover.js#11)
[clickButton] Source code:
[clickButton] function () {
[clickButton] [native code, arity=3D0]
In the file boxover.js, referenced in the error message, there are the =
following lines:
6 if (typeof document.attachEvent!=3D'undefined') {
7 window.attachEvent('onload',init);
8 document.attachEvent('onmousemove',moveMouse);
9 document.attachEvent('onclick',checkMove); }
10 else {
11 window.addEventListener('load',init,false);
12 document.addEventListener('mousemove',moveMouse,false);
13 document.addEventListener('click',checkMove,false);
14 }
-Sam
------=_NextPart_000_01A2_01C64813.EF25FAE0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.2802" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY=20
style=3D"WORD-WRAP: break-word; khtml-nbsp-mode: space; =
khtml-line-break: after-white-space"=20
bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>I have received an error message than I =
cannot=20
interpret. I am hoping that someone on the list</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>can explain this to me.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Here is an excerpt from my =
log:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>. . .</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>[clickButton] INFO=20
(com.canoo.webtest.steps.Step) - Exception thrown from this class:=20
com.canoo.webtest.engine.StepFailedException<BR>[clickButton] INFO =
(com.canoo.webtest.steps.Step) - Message was: Step[clickButton "Click =
the login=20
button" (4/5)]: Script error loading page executing webtest at: =
clickButton=20
TypeError: addEventListener is not a function, it is null. (<A=20
href=3D"http://dev.cayuse.com:8081/V8/jslib/boxover.js#11">http://dev.cay=
use.com:8081/V8/jslib/boxover.js#11</A>)<BR>[clickButton]=20
Source code:<BR>[clickButton] function () {<BR>[clickButton] =
[native code,=20
arity=3D0]</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>In the file boxover.js, referenced in =
the error=20
message, there are the following lines:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><FONT face=3D"Courier New"> 6 if =
(typeof=20
document.attachEvent!=3D'undefined') {<BR> 7 =20
window.attachEvent('onload',init);<BR> 8 =20
document.attachEvent('onmousemove',moveMouse);<BR> 9 &nbs=
p;=20
document.attachEvent('onclick',checkMove); }<BR>10 else=20
{<BR>11 =20
window.addEventListener('load',init,false);<BR>12 =20
document.addEventListener('mousemove',moveMouse,false);<BR>13 =
=20
document.addEventListener('click',checkMove,false);<BR>14 }</FONT></DIV>
<DIV> </DIV>
<DIV>-Sam<BR></DIV></FONT></BODY></HTML>
------=_NextPart_000_01A2_01C64813.EF25FAE0--