[Webtest] NullPointer Exception at clicklink

Atkinson, John (AGRE) webtest@lists.canoo.com
Wed, 24 Mar 2004 09:19:50 -0700


I am trying to fill out an HTML Form and submit the form through the use of=
 Canoo WebTest, but the test is consistantly throwing a Null Pointer=
 Exception at me.  I looked through some previous posts and found that=
 there was a bug with the clicklink task when the HREF pointed to a=
 javascript function and I think that that might be my problem.  Was that=
 bug ever addressed before build 426 (which is where I am)?

The link that I'm trying to follow appears like this:
<A HREF=3D"javascript:processForm('http://mysite/processForm',=
 'CreateObject', 'class', 'ext.si.MyObject2' )">OK&nbsp;<IMG SRC=
=3D"http://mysite/images/actnlink.gif" ALT=3D"Accept changes" BORDER=
=3D0></A>

The clicklink task is:
<clicklink
  stepid=3D"Click OK Link"
  label=3D"Accept changes"
/>

and the stack trace for the exception is:
exception=3D"com.canoo.webtest.engine.StepExecutionException" message=
=3D"Unexpected exception caught:=
 java.lang.NullPointerException">com.canoo.webtest.engine.StepExecutionExce=
ption: Unexpected exception caught: java.lang.NullPointerException, Step:=
 ClickLink at C:\Canoo\WebTest\doc\tests\Modules\createcr.xml:22:  with=
 (label=3D"Accept changes", stepId=3D"Click OK Link", stepType=
=3D"clicklink")&#xd;
	at=
 com.canoo.webtest.steps.Step.handleUnexpectedException(Step.java:334)&#xd;
	at=
 com.canoo.webtest.steps.request.Target.protectedGoto(Target.java:115)&#xd;
	at com.canoo.webtest.steps.request.Target.gotoTarget(Target.java:153)&#xd;
	at=
 com.canoo.webtest.steps.request.ClickLink.doExecute(ClickLink.java:36)&#xd=
;
	at com.canoo.webtest.steps.Step.execute(Step.java:99)&#xd;
	at com.canoo.webtest.engine.Engine.executeSteps(Engine.java:26)&#xd;
	at=
 com.canoo.webtest.ant.TestSpecificationTask.execute(TestSpecificationTask.=
java:68)&#xd;
	at=
 org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)&#xd;
	at org.apache.tools.ant.Task.perform(Task.java:364)&#xd;
	at org.apache.tools.ant.Target.execute(Target.java:301)&#xd;
	at org.apache.tools.ant.Target.performTasks(Target.java:328)&#xd;
	at org.apache.tools.ant.Project.executeTarget(Project.java:1215)&#xd;
	at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:383)&#xd;
	at=
 org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)&#xd;
	at org.apache.tools.ant.Task.perform(Task.java:364)&#xd;
	at org.apache.tools.ant.Target.execute(Target.java:301)&#xd;
	at org.apache.tools.ant.Target.performTasks(Target.java:328)&#xd;
	at org.apache.tools.ant.Project.executeTarget(Project.java:1215)&#xd;
	at org.apache.tools.ant.Project.executeTargets(Project.java:1063)&#xd;
	at org.apache.tools.ant.Main.runBuild(Main.java:632)&#xd;
	at org.apache.tools.ant.Main.startAnt(Main.java:183)&#xd;
	at org.apache.tools.ant.launch.Launcher.run(Launcher.java:197)&#xd;
	at org.apache.tools.ant.launch.Launcher.main(Launcher.java:56)&#xd;

Any ideas?

Thanx In Advance,
John S. Atkinson


</table> </Pre>
<HTML>
<br>
<br>
************************************************<br>
The information contained in, or attached to, this e-mail, may contain=
 confidential information and is intended solely for the use of the=
 individual or entity to whom they are addressed and may be subject to=
 legal privilege.  If you have received this e-mail in error you should=
 notify the sender immediately by reply e-mail, delete the message from=
 your system and notify your system manager.  Please do not copy it for any=
 purpose, or disclose its contents to any other person.  The views or=
 opinions presented in this e-mail are solely those of the author and do=
 not necessarily represent those of the company.  The recipient should=
 check this e-mail and any attachments for the presence of viruses.  The=
 company accepts no liability for any damage caused, directly or=
 indirectly, by any virus transmitted in this email.<br>
************************************************<br>
</HTML>