1 message in com.canoo.lists.webtest[Webtest] submitting a form that reli...
FromSent OnAttachments
David Gibbs (IT)17 Jul 2003 09:16 
Subject:[Webtest] submitting a form that relies on javascript
From:David Gibbs (IT) (gib@igindex.co.uk)
Date:07/17/2003 09:16:37 AM
List:com.canoo.lists.webtest

Chaps,

I've got stuck trying to submit a form that relies on java script for submission. The link that submits the form is of the form.

<a href="javascript:afSubmit()" class="header"><b>Submit</b>&nbsp;<img src="img/ig_arrow.gif" width="4" height="7" border="0" alt=""></a>

I can't use "clickbutton" (because there isn't one) and I presume "clicklink" isn't succeeding from the following stack trace.

Are there any alternative ways to submit the form ? here's the way I tried "clicklink"

<clicklink stepid="Try to submit form" label="Submit" href="afSubmit" />

file:C:/gibbsd/work/Prospects2/test/cases/prospect.xml:12: Test failed. Exception raised: java.lang.NullPointerExceptionjava.lang.NullPointerException at com.canoo.webtest.engine.Context.getResponseFileName(Context.java:88) at com.canoo.webtest.engine.Context.writeLastResponse(Context.java:156) at com.canoo.webtest.engine.Context.setLastResponseAndSaveIfNeeded(Context.java :135) at com.canoo.webtest.engine.Context.setLastResponseForStep(Context.java:120) at com.canoo.webtest.steps.request.Target.gotoTarget(Target.java:239) at com.canoo.webtest.steps.request.Target.gotoTarget(Target.java:186) at com.canoo.webtest.steps.request.ClickLink.doExecute(ClickLink.java:48) at com.canoo.webtest.steps.Step.execute(Step.java:59) at com.canoo.webtest.engine.Engine.executeSteps(Engine.java:32) at com.canoo.webtest.ant.TestSpecificationTask.execute(TestSpecificationTask.ja va:63) at org.apache.tools.ant.Task.perform(Task.java:319) 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:1306) at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:371) at org.apache.tools.ant.Task.perform(Task.java:319) 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:1306) at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:371) at org.apache.tools.ant.Task.perform(Task.java:319) 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:1306) at org.apache.tools.ant.Project.executeTargets(Project.java:1250) at org.apache.tools.ant.Main.runBuild(Main.java:610) at org.apache.tools.ant.Main.start(Main.java:196) at org.apache.tools.ant.Main.main(Main.java:235)

thanks

David Gibbs

IG Index Plc <?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" />157-168 Blackfriars Road Waterloo London SE1 8EZ