AW: [Webtest] JavaSkript-Error

Aatish Arora webtest@lists.canoo.com
Thu, 26 Jun 2003 04:30:42 -0700 (PDT)


Hi,

I used to face similar problems with JS unless i
realised that the JS being wrriten wasnt quite good...

For eg if i had a JS with something like "a.getlist"
it wouldnt work... but "document.a.getlist" would!

Strange but i face such problems everyday... I am not
a JS guru so could be wrong...

If you remove your js.jar...JS support is turned off
and in some cases where you use JS on ur web
pages...the tcs might fail.


Cheers!
Aatish

--- "Stein A.,DP ITS,SMK,EF" <A.Stein@deutschepost.de>
wrote:
> Hi Mike,
> 
> thanks for this information. I have do it. The error
> message don't see it.
> 
> Regards,
> Annett
> 
> -----Ursprüngliche Nachricht-----
> Von: Friedrich Mike (KAFC 31)
> [mailto:mike.friedrich@credit-suisse.com]
> Gesendet am: Mittwoch, 25. Juni 2003 08:37
> An: 'webtest@gate.canoo.com'
> Betreff: RE: [Webtest] JavaSkript-Error
> 
> HI Annett
> 
> go in your WEBTEST_HOME directory
> there u will find a lib directory 
> in there should be a file named js.jar
> rename that file into something like js.jar-off
> 
> recheck the html-page
> bingo - the error message should not appear anymore
> 
> cheers mike
> 
> 
> 
> 
> -----Original Message-----
> From: Stein A.,DP ITS,SMK,EF
> [mailto:A.Stein@deutschepost.de]
> Sent: Wednesday, June 25, 2003 7:20 AM
> To: 'webtest@gate.canoo.com'
> Subject: AW: [Webtest] JavaSkript-Error
> Importance: Low
> 
> 
> Hi Mike,
> 
> thank You for Your answer. What can I make, that
> this error not to see it? 
> Can you explain me?
> 
> Thanks,
> Annett
> 
> -----Ursprüngliche Nachricht-----
> Von: Friedrich Mike (KAFC 31)
> [mailto:mike.friedrich@credit-suisse.com]
> Gesendet am: Dienstag, 24. Juni 2003 16:00
> An: 'webtest@gate.canoo.com'
> Betreff: RE: [Webtest] JavaSkript-Error
> 
> HI Anett
> 
> I had the same error when I started with WebTest.
> Contacted Canoo.
> 
> They told be to uncomment the js.jar -file in
> WEBTEST_HOME/lib driectory
> Since this library checks the Javascript-part
> embedded in html. But this
> library is quite error-prone.
> 
> The disadvantage of this is, that your javascript
> code will not be checked. 
> But works fine for my purposes.
> 
> Cheers mike
> 
> 
> 
> 
> -----Original Message-----
> From: Stein A.,DP ITS,SMK,EF
> [mailto:A.Stein@deutschepost.de]
> Sent: Tuesday, June 24, 2003 3:48 PM
> To: 'webtest@lists.canoo.com'
> Subject: [Webtest] JavaSkript-Error
> 
> 
> Hello,
> 
> I have follow error:
> 
> 
> D:\Programme\canoo_webtest\doc\samples>ant
> -buildfile
>
D:\Programme\canoo_webtest\doc\samples\simpleSmartphil.xml
> Buildfile:
>
D:\Programme\canoo_webtest\doc\samples\simpleSmartphil.xml
> 
> clean:
>    [delete] Deleting 5 files from
> D:\tmp\SmartPhilDemo
> 
> main:
>  [testSpec] TypeError: [object Control] is not a
> function. (httpunit; line
> 6)
>  [testSpec]     at
>
org.mozilla.javascript.NativeGlobal.constructError(NativeGlobal.java:590)
>  [testSpec]     at
>
org.mozilla.javascript.NativeGlobal.constructError(NativeGlobal.java:550)
>  [testSpec]     at
>
org.mozilla.javascript.NativeGlobal.typeError1(NativeGlobal.java:560)
>  [testSpec]     at
>
org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:1184)
>  [testSpec]     at
> org.mozilla.javascript.gen.c22.call(httpunit:6)
>  [testSpec]     at
>
org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2179)
>  [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:52)
>  [testSpec]     at
>
com.meterware.httpunit.FormControl.sendOnChangeEvent(FormControl.java:226)
>  [testSpec]     at
>
com.meterware.httpunit.SelectionFormControl.claimUniqueValue(FormControl.jav
> a:898)
>  [testSpec]     at
>
com.meterware.httpunit.FormParameter.setValues(FormParameter.java:90)
>  [testSpec]     at
>
com.meterware.httpunit.WebForm.setParameter(WebForm.java:519)
>  [testSpec]     at
>
com.canoo.webtest.steps.request.ClickButton.addParameter(ClickButton.java:23
> 3)
>  [testSpec]     at
>
com.canoo.webtest.steps.request.ClickButton.setParameters(ClickButton.java:1
> 79)
>  [testSpec]     at
>
com.canoo.webtest.steps.request.ClickButton.doExecute(ClickButton.java:90)
>  [testSpec]     at
> com.canoo.webtest.steps.Step.execute(Step.java:59)
>  [testSpec]     at
>
com.canoo.webtest.engine.Engine.executeSteps(Engine.java:32)
>  [testSpec]     at
>
com.canoo.webtest.ant.TestSpecificationTask.execute(TestSpecificationTask.ja
> va:55)
>  [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.Project.executeTargets(Project.java:1255)
>  [testSpec]     at
> org.apache.tools.ant.Main.runBuild(Main.java:609)
>  [testSpec]     at
> org.apache.tools.ant.Main.start(Main.java:196)
>  [testSpec]     at
> org.apache.tools.ant.Main.main(Main.java:235)
> 
> BUILD FAILED
>
file:D:/Programme/canoo_webtest/doc/samples/simpleSmartphil.xml:10:
> Test
> failed.
> Exception raised:
> com.meterware.httpunit.ScriptException: Event
> 'setAction('reload');' failed: TypeError: [object
> Control] is not a functi
>  (httpunit; line
> 6)com.meterware.httpunit.ScriptException: Event
> 'setAction('reload');' failed: TypeError: [object
> Control] is not a func
> on. (httpunit; line 6)
>         at
>
com.meterware.httpunit.javascript.JavaScript$JavaScriptEngine.handleScriptEx
> ception(JavaScript.java:191)
>         at
>
com.meterware.httpunit.javascript.JavaScript$JavaScriptEngine.performEvent(J
> avaScript.java:165)
>         at
>
com.meterware.httpunit.scripting.ScriptableDelegate.doEvent(ScriptableDelega
> te.java:52)
>         at
>
com.meterware.httpunit.FormControl.sendOnChangeEvent(FormControl.java:226)
>         at
>
com.meterware.httpunit.SelectionFormControl.claimUniqueValue(FormControl.jav
> a:898)
>         at
>
com.meterware.httpunit.FormParameter.setValues(FormParameter.java:90)
>         at
>
com.meterware.httpunit.WebForm.setParameter(WebForm.java:519)
>         at
>
com.canoo.webtest.steps.request.ClickButton.addParameter(ClickButton.java:23
> 3)
>         at
>
com.canoo.webtest.steps.request.ClickButton.setParameters(ClickButton.java:1
> 79)
>         at
> 
=== message truncated ===


=====
========================
THE FOUR STAGES OF LIFE:

1) You believe in Santa Claus.
2) You don't believe in Santa Claus.
3) You are Santa Claus.
4) You look like Santa Claus.
========================

__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com