[Webtest] NullPointerException on clickLink for javascript
Marc Guillemot
webtest@lists.canoo.com
Thu, 05 Feb 2004 09:42:43 +0100
No idea.
Have you the stack trace of the root cause, in this case, it would probably
provide better information.
Marc.
Glen Cordrey wrote:
> Any idea why I'm getting the NullPointerException on the clicklink that
> I want to exercise the javascript in
> the buttonLink shown below?
>
> 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="getElementById", label="log in",
> stepId="Click the submit button", stepType="cli
> cklink")com.canoo.webtest.engine.StepExecutionException: Unexpected
> exception caught: java.lang.NullPointerException, St
> ep: ClickLink at with (href="getElementById", label="log in",
> stepId="Click the submit button", stepType="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)
>
> <clicklink label="log in"
> stepid="Click the submit button"/>
>
> <a class="buttonLink"
> href="javascript:document.getElementById('loginForm').submit();"
> testId="a_loginSubmit">
> <img align="absmiddle" alt="" border="0" class="buttonImage"
> name="imgBtnArrow" src="images/layout/btn_arrow_r.gif" />
> log in</a>
> ------------------------------------------------------------------------
>
> *Glen Cordrey Convera*
>
> voice: (410) 740-8800 x1150 http://www.convera.com
> <http://www.convera.com/>
> fax: (410) 740-8810
>
>