[Webtest] Help - input type=button

Aatish Arora webtest@lists.canoo.com
Wed, 7 Apr 2004 02:30:13 -0700 (PDT)


I guess javascript support for a button was supported
since a long time...

Aatish

--- Roma Bhansali <roma@pharmquest.com> wrote:
> Hi Audra,
> I am pretty new to Canoo but how much I know of, it
> is because you have a
> javascript associated with the button. And it does
> not support the same. 
>  
> -Roma
> 
> -----Original Message-----
> From: Audra Church [mailto:audra.church@fedex.com]
> Sent: Tuesday, April 06, 2004 10:26 AM
> To: 'webtest@lists.canoo.com'
> Subject: [Webtest] Help - input type=button
> 
> 
> I am having troubles with clicking my button. I have
> searched for examples
> on the web but I can't seem to find one. Below you
> will find my velocity
> code and my .xml file. I am receiving the following
> error. Please let me
> know if you have any ideas why it is not working and
> what can be done to fix
> it. 
> Thanks! 
> Audra 
>   
> 
> [testSpec] java.lang.RuntimeException: No such
> property: action 
>  [testSpec] at
>
com.meterware.httpunit.scripting.ScriptableDelegate.set(ScriptableDelegate.j
> ava:98) 
>  [testSpec] at
>
com.meterware.httpunit.WebForm$Scriptable.set(WebForm.java:604)
> 
>  [testSpec] at
>
com.meterware.httpunit.javascript.JavaScript$JavaScriptEngine.put(JavaScript
> .java:265) 
>  [testSpec] at
>
org.mozilla.javascript.ScriptableObject.putProperty(ScriptableObject.java:14
> 76) 
>  [testSpec] at
>
org.mozilla.javascript.ScriptRuntime.setProp(ScriptRuntime.java:844)
> 
>  [testSpec] at
>
org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2056)
> 
>  [testSpec] at
>
org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2173)
> 
>  [testSpec] at
>
org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:58)
> 
>  [testSpec] at
>
com.meterware.httpunit.javascript.JavaScript$JavaScriptEngine.performEvent(J
> avaScript.java:162) 
>  [testSpec] at
>
com.meterware.httpunit.scripting.ScriptableDelegate.doEvent(ScriptableDelega
> te.java:55) 
>  [testSpec] at
>
com.meterware.httpunit.Button.doOnClickEvent(Button.java:85)
> 
>  [testSpec] at
> com.meterware.httpunit.Button.click(Button.java:68) 
>  [testSpec] at
>
com.canoo.webtest.steps.request.ClickButton$1.call(ClickButton.java:120)
> 
>  [testSpec] at
>
com.canoo.webtest.steps.request.Target.protectedGoto(Target.java:106)
> 
>  [testSpec] at
>
com.canoo.webtest.steps.request.ClickButton.gotoTarget(ClickButton.java:110)
> 
>  [testSpec] at
>
com.canoo.webtest.steps.request.ClickButton.doExecute(ClickButton.java:103)
> 
>  [testSpec] at
> com.canoo.webtest.steps.Step.execute(Step.java:99) 
>  [testSpec] at
>
com.canoo.webtest.engine.Engine.executeSteps(Engine.java:26)
> 
>  [testSpec] at
>
com.canoo.webtest.ant.TestSpecificationTask.execute(TestSpecificationTask.ja
> va:68) 
>  [testSpec] at
> org.apache.tools.ant.Task.perform(Task.java:341) 
>  [testSpec] at
> org.apache.tools.ant.Target.execute(Target.java:309)
> 
>  [testSpec] at
>
org.apache.tools.ant.Target.performTasks(Target.java:336)
> 
>  [testSpec] at
>
org.apache.tools.ant.Project.executeTarget(Project.java:1339)
> 
>  [testSpec] at
>
org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:397)
> 
>  [testSpec] at
> org.apache.tools.ant.Task.perform(Task.java:341) 
>  [testSpec] at
> org.apache.tools.ant.Target.execute(Target.java:309)
> 
>  [testSpec] at
>
org.apache.tools.ant.Target.performTasks(Target.java:336)
> 
>  [testSpec] at
>
org.apache.tools.ant.Project.executeTarget(Project.java:1339)
> 
>  [testSpec] at
>
org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunn
> er.java:381) 
>  [testSpec] at
>
org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRun
> ner.java:166) 
>  [testSpec] ERROR (Step.java:333) - Cannot handle
> unexpected exception in
> step ClickButton at
>
file:C:/eclipse/workspace/SuppliesJ2ee/SuppliesWebApp/test/usecases/../modul
> es/loginOrderQuery.xml:14:  with (label="Logon",
> stepId="Clicking the
> button", stepType="clickbutton") 
>  [testSpec] java.lang.RuntimeException: Event
> 'submitLogon()' failed:
> java.lang.RuntimeException: No such property: action
> 
>  [testSpec] at
>
com.meterware.httpunit.javascript.JavaScript$JavaScriptEngine.handleScriptEx
> ception(JavaScript.java:189) 
>  [testSpec] at
>
com.meterware.httpunit.javascript.JavaScript$JavaScriptEngine.performEvent(J
> avaScript.java:165) 
>  [testSpec] at
>
com.meterware.httpunit.scripting.ScriptableDelegate.doEvent(ScriptableDelega
> te.java:55) 
>  [testSpec] at
>
com.meterware.httpunit.Button.doOnClickEvent(Button.java:85)
> 
>  [testSpec] at
> com.meterware.httpunit.Button.click(Button.java:68) 
>  [testSpec] at
>
com.canoo.webtest.steps.request.ClickButton$1.call(ClickButton.java:120)
> 
>  [testSpec] at
>
com.canoo.webtest.steps.request.Target.protectedGoto(Target.java:106)
> 
>  [testSpec] at
>
com.canoo.webtest.steps.request.ClickButton.gotoTarget(ClickButton.java:110)
> 
>  [testSpec] at
>
com.canoo.webtest.steps.request.ClickButton.doExecute(ClickButton.java:103)
> 
>  [testSpec] at
> com.canoo.webtest.steps.Step.execute(Step.java:99) 
>  [testSpec] at
>
com.canoo.webtest.engine.Engine.executeSteps(Engine.java:26)
> 
>  [testSpec] at
>
com.canoo.webtest.ant.TestSpecificationTask.execute(TestSpecificationTask.ja
> va:68) 
>  [testSpec] at
> org.apache.tools.ant.Task.perform(Task.java:341) 
>  [testSpec] at
> org.apache.tools.ant.Target.execute(Target.java:309)
> 
>  [testSpec] at
>
org.apache.tools.ant.Target.performTasks(Target.java:336)
> 
>  [testSpec] at
>
org.apache.tools.ant.Project.executeTarget(Project.java:1339)
> 
>  [testSpec] at
>
org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:397)
> 
>  [testSpec] at
> org.apache.tools.ant.Task.perform(Task.java:341) 
>  [testSpec] at
> org.apache.tools.ant.Target.execute(Target.java:309)
> 
>  [testSpec] at
>
org.apache.tools.ant.Target.performTasks(Target.java:336)
> 
>  [testSpec] at
>
org.apache.tools.ant.Project.executeTarget(Project.java:1339)
> 
>  [testSpec] at
>
org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunn
> er.java:381) 
>  [testSpec] at
>
org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRun
> ner.java:166) 
> BUILD FAILED:
>
file:C:/eclipse/workspace/SuppliesJ2ee/SuppliesWebApp/test/usecases/main.xml
> :18: Test failed. 
> Exception raised:
> com.canoo.webtest.engine.StepExecutionException:
> Unexpected exception caught:
> java.lang.RuntimeException: Event
> 'submitLogon()' failed: java.lang.RuntimeException:
> No such property:
> 
=== message truncated ===


=====
"I'm thinking about going off to seek adventure. Or maybe adventure can come here."

"I hope it calls first instead of just popping in." 

--- Garfield

__________________________________
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway 
http://promotions.yahoo.com/design_giveaway/