[Webtest] NullPointerException on clickLink for javascript
Glen Cordrey
webtest@lists.canoo.com
Wed, 4 Feb 2004 16:47:58 -0500
This is a multi-part message in MIME format.
------_=_NextPart_001_01C3EB68.8D8C2420
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Any idea why I'm getting the NullPointerException on the clicklink that =
I want to exercise the javascript in
the buttonLink shown below?
=20
file:E:/ci/canooTests/auto_search.xml:12: Test failed.
Exception raised: com.canoo.webtest.engine.StepExecutionException: =
Unexpected exception caught: java.lang.NullPointerExc
eption, Step: ClickLink at with (href=3D"getElementById", label=3D"log =
in", stepId=3D"Click the submit button", stepType=3D"cli
cklink")com.canoo.webtest.engine.StepExecutionException: Unexpected =
exception caught: java.lang.NullPointerException, St
ep: ClickLink at with (href=3D"getElementById", label=3D"log in", =
stepId=3D"Click the submit button", stepType=3D"clicklink")
at =
com.canoo.webtest.steps.Step.handleUnexpectedException(Step.java:343)
at =
com.canoo.webtest.steps.request.Target.protectedGoto(Target.java:115)
at =
com.canoo.webtest.steps.request.Target.gotoTarget(Target.java:153)
at =
com.canoo.webtest.steps.request.ClickLink.doExecute(ClickLink.java:36)
at com.canoo.webtest.steps.Step.execute(Step.java:103)
at com.canoo.webtest.engine.Engine.executeSteps(Engine.java:26)
at =
com.canoo.webtest.ant.TestSpecificationTask.execute(TestSpecificationTask=
.java:61)
at =
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:193)
at org.apache.tools.ant.Task.perform(Task.java:341)
at org.apache.tools.ant.Target.execute(Target.java:309)
at org.apache.tools.ant.Target.performTasks(Target.java:336)
at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
at =
org.apache.tools.ant.Project.executeTargets(Project.java:1255)
at org.apache.tools.ant.Main.runBuild(Main.java:609)
at org.apache.tools.ant.Main.start(Main.java:196)
at org.apache.tools.ant.Main.main(Main.java:235)
=20
<clicklink label=3D"log in" =20
stepid=3D"Click the submit button"/>
=20
<a class=3D"buttonLink"=20
href=3D"javascript:document.getElementById('loginForm').submit();"=20
testId=3D"a_loginSubmit">
<img align=3D"absmiddle" alt=3D"" border=3D"0" class=3D"buttonImage"
name=3D"imgBtnArrow" src=3D"images/layout/btn_arrow_r.gif" />
log in</a>
_____ =20
Glen Cordrey Convera =20
voice: (410) 740-8800 x1150 http://www.convera.com =
<http://www.convera.com/>=20
fax: (410) 740-8810
=20
=20
------_=_NextPart_001_01C3EB68.8D8C2420
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=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1276" name=3DGENERATOR></HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D859303221-04022004>Any =
idea why I'm=20
getting the NullPointerException on the clicklink that I want to =
exercise the=20
javascript in</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D859303221-04022004>the =
buttonLink shown=20
below?</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D859303221-04022004></SPAN></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><SPAN =
class=3D859303221-04022004></SPAN></FONT><FONT=20
face=3DArial size=3D2>file:E:/ci/canooTests/auto_search.xml:12: Test=20
failed.<BR>Exception raised: =
com.canoo.webtest.engine.StepExecutionException:=20
Unexpected exception caught: java.lang.NullPointerExc<BR>eption, Step: =
ClickLink=20
at with (href=3D"getElementById", label=3D"log in", =
stepId=3D"Click the submit=20
button",=20
stepType=3D"cli<BR>cklink")com.canoo.webtest.engine.StepExecutionExceptio=
n:=20
Unexpected exception caught: java.lang.NullPointerException, St<BR>ep: =
ClickLink=20
at with (href=3D"getElementById", label=3D"log in", =
stepId=3D"Click the submit=20
button", =
stepType=3D"clicklink")<BR> at =
com.canoo.webtest.steps.Step.handleUnexpectedException(Step.java:343)<BR>=
=20
at=20
com.canoo.webtest.steps.request.Target.protectedGoto(Target.java:115)<BR>=
=20
at=20
com.canoo.webtest.steps.request.Target.gotoTarget(Target.java:153)<BR>&nb=
sp; =20
at=20
com.canoo.webtest.steps.request.ClickLink.doExecute(ClickLink.java:36)<BR=
> =20
at=20
com.canoo.webtest.steps.Step.execute(Step.java:103)<BR> =
=20
at=20
com.canoo.webtest.engine.Engine.executeSteps(Engine.java:26)<BR> &nb=
sp; =20
at=20
com.canoo.webtest.ant.TestSpecificationTask.execute(TestSpecificationTask=
.java:61)<BR> =20
at=20
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:193)<BR>&=
nbsp; =20
at=20
org.apache.tools.ant.Task.perform(Task.java:341)<BR> &nb=
sp; =20
at=20
org.apache.tools.ant.Target.execute(Target.java:309)<BR>  =
; =20
at=20
org.apache.tools.ant.Target.performTasks(Target.java:336)<BR> =
=20
at=20
org.apache.tools.ant.Project.executeTarget(Project.java:1339)<BR> &n=
bsp; =20
at=20
org.apache.tools.ant.Project.executeTargets(Project.java:1255)<BR> &=
nbsp; =20
at=20
org.apache.tools.ant.Main.runBuild(Main.java:609)<BR> &n=
bsp; =20
at=20
org.apache.tools.ant.Main.start(Main.java:196)<BR>  =
; =20
at org.apache.tools.ant.Main.main(Main.java:235)</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=3D2><FONT face=3DArial><clicklink label=3D"log =
in" =20
<BR> stepid=3D"Click the submit =
button"/></FONT></FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=3D2><FONT face=3DArial><a class=3D"buttonLink"=20
<BR>href=3D"javascript:document.getElementById('loginForm').submit();"=20
<BR>testId=3D"a_loginSubmit"><BR><img align=3D"absmiddle" alt=3D"" =
border=3D"0"=20
class=3D"buttonImage"<BR>name=3D"imgBtnArrow" =
src=3D"images/layout/btn_arrow_r.gif"=20
/><BR>log in</a><BR></FONT></DIV></FONT>
<DIV>
<HR>
<P><FONT face=3DArial><FONT size=3D3><FONT color=3D#808000><STRONG>Glen=20
Cordrey =
<FONT=20
color=3D#000000> Convera</FONT></STRONG></FONT> </FONT>&n=
bsp; &nb=
sp;</FONT></P></DIV>
<DIV><FONT face=3DArial size=3D2>voice: (410) 740-8800 =
x1150 <A=20
href=3D"http://www.convera.com/">http://www.convera.com</A></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>fax: (410) =
740-8810</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV> </DIV></BODY></HTML>
------_=_NextPart_001_01C3EB68.8D8C2420--