[Webtest] Javascript support ready!
Healey, Thomas
webtest@lists.canoo.com
Mon, 17 Mar 2003 12:37:25 -0500
This is a multi-part message in MIME format.
------_=_NextPart_001_01C2ECAB.DFC0220E
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Please remove previous 2 posts from me regarding this subject I have
attached the HTML code.
Remove Previous post as the HTML confused everything.
Mittie,
Thanks for the help. I did remove the js.jar from the path and all is
well. Below is the HTML code that caused the "error". I hope this
helps. I don't need to test this piece of JS code, but I believe in
other parts of our app I will need to test JS. That is weeks away.
Tom
P.S. In previous posts I asked for the location of 2 missing xml files
that are needed to successfully run the junit tests. Can you send them
to me? Also, I posted a question about setting the init value in a
repeat to something user defined so that I can traverse an XML doc using
Xpath in a loop. I.e.=20
<repeat init=3D"1" stepid=3D"Create N events" count=3D"10">
<storexpath=20
stepid=3D"Extract the data for the begin date"
xpath=3D"/testvalues/dataset[#{count}]/BeginDate"
property=3D"bdate"=20
/>
<setinputfield=20
stepId=3D"Filling in field Begins"=20
name=3D"begins"
value=3D"#{bdate}"
/>
</repeat>
Well, I modified the code(repeatstep.java,repeatWrapper.java) and
webtest.dtd to allow for the init value in the repeat section. This
allows the dynamic property "count"(or whatever the counter name is) to
be set to that value so that the repeat loop starts at the value
specified in "init" instead of 0. The loop will still interate 10 times
in this case. This way I can read, in my case, the 1st element in the
/testvalues/dataset tree. If the "init" value is not specified the
default is zero so it will default to the way it works now. I also fixed
what "I" think is a bug in the StoreXPath.getXPath (StoreXpath.java)
that doesn't expand the dynamic properties before calling
document.selectSingleNode( fXPath ) so that the dynamic property
"count" is expanded and the correct element in the document is
retrieved.(Dynamic properties are expanded in the VerifyXPath code) So
back to my original question, I would like to run the unit tests without
error which I can't without the files to ensure that I didn't break
anything. I will also modify the junit tests to test out the new code. I
also would like to submit the changes for review and inclusion in the
build if the committers see value in the changes. I am wondering who I
can contact to do this?
-->
-----Original Message-----
From: webtest-admin@lists.canoo.com
[mailto:webtest-admin@lists.canoo.com] On Behalf Of Healey, Thomas
Sent: Friday, March 14, 2003 4:46 PM
To: webtest@lists.canoo.com
Subject: RE: [Webtest] Javascript support ready!
Thank you for the upgrade. Do I need to do anything special to my
scripts to make JS work. My problems is that I have an onload popup on
the start page of the app. And I am getting the following error: Event
'javascript:popup();' failed: ConversionError: The undefined value has
no properties. (httpunit; line 2) Stacktrace
com.meterware.httpunit.ScriptException: Event 'javascript:popup();'
failed: ConversionError: The undefined value has no properties.
(httpunit; line 2)
at
com.meterware.httpunit.javascript.JavaScript$JavaScriptEngine.handleScri
ptException(JavaScript.java:176)
at
com.meterware.httpunit.javascript.JavaScript$JavaScriptEngine.performEve
nt(JavaScript.java:151)
at
com.meterware.httpunit.scripting.ScriptableDelegate.doEvent(ScriptableDe
legate.java:46)
at
com.meterware.httpunit.WebResponse$Scriptable.load(WebResponse.java:576)
at
com.meterware.httpunit.javascript.JavaScript$Window.initialize(JavaScrip
t.java:364)
at
com.meterware.httpunit.javascript.JavaScript.run(JavaScript.java:79)
at
com.meterware.httpunit.javascript.JavaScriptEngineFactory.associate(Java
ScriptEngineFactory.java:46)
at
com.meterware.httpunit.FrameHolder.updateFrames(FrameHolder.java:82)
at
com.meterware.httpunit.WebWindow.updateFrameContents(WebWindow.java:184)
at
com.meterware.httpunit.WebClient.updateFrameContents(WebClient.java:472)
at
com.meterware.httpunit.WebWindow.updateWindow(WebWindow.java:167)
at
com.meterware.httpunit.WebWindow.getResponse(WebWindow.java:111)
at
com.meterware.httpunit.WebWindow.getResponse(WebWindow.java:91)
at
com.meterware.httpunit.WebClient.getResponse(WebClient.java:87)
at
com.canoo.webtest.steps.request.Target.getResponse(Target.java:257)
at
com.canoo.webtest.steps.request.Target.gotoTarget(Target.java:216)
at
com.canoo.webtest.steps.request.Target.gotoTarget(Target.java:183)
at
com.canoo.webtest.steps.request.InvokePage.doExecute(InvokePage.java:41)
at com.canoo.webtest.steps.Step.execute(Step.java:56)
at com.canoo.webtest.engine.Engine.executeSteps(Engine.java:32)
at
com.canoo.webtest.ant.TestSpecificationTask.execute(TestSpecificationTas
k.java:55)
at org.apache.tools.ant.Task.perform(Task.java:317)
at org.apache.tools.ant.Target.execute(Target.java:309)
at org.apache.tools.ant.Target.performTasks(Target.java:334)
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)
TIA,
Tom Healey
-----Original Message-----
From: webtest-admin@lists.canoo.com
[mailto:webtest-admin@lists.canoo.com] On Behalf Of Dierk Koenig
Sent: Thursday, March 13, 2003 2:01 PM
To: webtest@lists.canoo.com
Cc: Andreas Henle; Marcel Ruedi; Hans Wegener; Gerd Hillebrand; Alexio
Moreno
Subject: [Webtest] Javascript support ready!
Hiall,
I'm happy to announce the first Version of CanooWebTest that also
supports JavaScript. This concerns build number 275 and higher.
I'm sure the community will find a lot of deficiencies in the JS
implementation but I hope you will appreciate it anyway.
I unexpectedly re-introduced the "testCacheBug", although I tried to
avoid it. Carsten: could you please help me with that?
I would recommend to try this build on a separate installation as some
changes may break a lot of your tests. The parser is now somewhat sloppy
(like most browsers).
happy testing
Mittie
P.S. new httpunit version in use is 1.5.3-d-12M
------_=_NextPart_001_01C2ECAB.DFC0220E
Content-Type: text/plain;
name="jserror.txt"
Content-Transfer-Encoding: base64
Content-Description: jserror.txt
Content-Disposition: attachment;
filename="jserror.txt"
PCEtLQ0KKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq
KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioNCjxodG1sIGxhbmc9
ImVuIj4NCiAgICA8aGVhZD4NCiAgICAgICAgPExJTksgUkVMPVN0eWxlU2hlZXQgSFJFRj0iaHR0
cDovLzEyOC4xNDMuMTM1LjQxL2FsdW0vc3R5bGUuY3NzIiBUWVBFP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DQoN
Cjxib2R5IGJnY29sb3I9IiNGRkZGRkYiIHRleHQ9IiMwMDAwMDAiIGxlZnRtYXJnaW49IjAiIHRv
cG1hcmdpbj0iMCIgbWFyZ2lud2lkdGg9IjAiIG1hcmdpbmhlaWdodD0iMCIgb25sb2FkPSJqYXZh
c2NyaXB0OnBvcHVwKCk7Ij4NCg0KPCEtLSBCRUdJTiBFWFRFUk5BTCBUQUJMRSBUSEFUIElTIENF
TlRFUkVEIE9OIFBBR0UgLS0+DQoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq
KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq
KioqKioqKioqKioqKioqDQo=
------_=_NextPart_001_01C2ECAB.DFC0220E--