23 messages in com.canoo.lists.webtestRE: [Webtest] Javascript support ready!
FromSent OnAttachments
Scot Hale25 Feb 2003 16:54 
Goeschl Siegfried27 Feb 2003 01:11 
Scot Hale27 Feb 2003 08:51 
Goeschl Siegfried27 Feb 2003 08:52 
Scot Hale27 Feb 2003 10:07 
Goeschl Siegfried27 Feb 2003 10:26 
Scot Hale27 Feb 2003 11:06 
Goeschl Siegfried27 Feb 2003 11:55 
Scot Hale27 Feb 2003 13:13 
Scot Hale27 Feb 2003 13:37 
Siegfried Göschl28 Feb 2003 02:17 
Aatish Arora05 Mar 2003 04:30 
Dierk Koenig13 Mar 2003 11:00 
Jitendra Joshi14 Mar 2003 03:56 
Goeschl Siegfried14 Mar 2003 04:10 
Dierk Koenig localhost14 Mar 2003 06:24 
Healey, Thomas14 Mar 2003 13:45 
Dierk Koenig localhost17 Mar 2003 04:06 
Healey, Thomas17 Mar 2003 09:09 
Healey, Thomas17 Mar 2003 09:20 
Healey, Thomas17 Mar 2003 09:37.txt
Christian Sell18 Mar 2003 00:17 
Dierk Koenig localhost18 Mar 2003 01:00 
Subject:RE: [Webtest] Javascript support ready!
From:Healey, Thomas (Heal@darden.virginia.edu)
Date:03/17/2003 09:09:49 AM
List:com.canoo.lists.webtest

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.

************************************************************************ *********************** <html lang="en"> <head> <LINK REL=StyleSheet HREF="http://128.143.135.41/alum/style.css" TYPE="text/css" MEDIA=screen> <LINK REL=StyleSheet HREF="http://128.143.135.41/alum/style2.css" TYPE="text/css" MEDIA=screen> <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title> Alumni System </title>

<script language="JavaScript"> function popup() { var allcookies = document.cookie; var pos = allcookies.indexOf("poppedup"); if (pos == -1) { var nextyear = new Date(); nextyear.setFullYear(nextyear.getFullYear() + 1); document.cookie = "poppedup=yes; expires=" + nextyear.toGMTString();

window.open("http://www.darden.edu","popup",'scrollbars=yes,resizable=ye s,width=250,height=400'); } } </script>

</head>

<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onload="javascript:popup();">

<!-- BEGIN EXTERNAL TABLE THAT IS CENTERED ON PAGE --> ************************************************************************ *************************************

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. <repeat init="1" stepid="Create N events" count="10"> <storexpath stepid="Extract the data for the begin date" xpath="/testvalues/dataset[#{count}]/BeginDate" property="bdate" /> <setinputfield stepId="Filling in field Begins" name="begins" value="#{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. 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: webt@lists.canoo.com [mailto:webt@lists.canoo.com] On Behalf Of Healey, Thomas Sent: Friday, March 14, 2003 4:46 PM To: webt@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: webt@lists.canoo.com [mailto:webt@lists.canoo.com] On Behalf Of Dierk Koenig Sent: Thursday, March 13, 2003 2:01 PM To: webt@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