8 messages in com.canoo.lists.webtestRE: [Webtest] Re: AJAX (DWR) webtest ...| From | Sent On | Attachments |
|---|---|---|
| Simon Gibson | 12 Oct 2005 03:29 | |
| Marc Guillemot | 12 Oct 2005 04:37 | |
| Simon Gibson | 24 Oct 2005 05:37 | |
| Marc Guillemot | 24 Oct 2005 12:21 | |
| Richard HALLIER | 07 Dec 2005 06:44 | |
| Marc Guillemot | 07 Dec 2005 07:09 | |
| Richard HALLIER | 07 Dec 2005 07:28 | |
| Marc Guillemot | 07 Dec 2005 08:04 |
| Subject: | RE: [Webtest] Re: AJAX (DWR) webtest Compatability![]() |
|---|---|
| From: | Richard HALLIER (fred...@laposte.net) |
| Date: | 12/07/2005 07:28:58 AM |
| List: | com.canoo.lists.webtest |
Thank you for your fast reply, Marc.
Is the R_1041 version of Canoo Web Test integrating the latest cvs snapshot of
htmlunit ?
R.
-----Message d'origine----- De : webt...@lists.canoo.com [mailto:webt...@lists.canoo.com]De la part de Marc Guillemot Envoyé : mercredi 7 décembre 2005 16:10 À : webt...@lists.canoo.com Objet : Re: [Webtest] Re: AJAX (DWR) webtest Compatability
Hi Richard,
this comes from a currently incomplete implementation of XMLHttpRequest in htmlunit. To be more precise the responseXML is not totally mapped to be accessed using the normal JS syntax. In your case it is probably the nodes that can't be accessed with syntax "nodes[0]".
Marc.
Richard HALLIER wrote:
Hi all,
I'm using the latest 1.7 version, build number = R_1041.
It is a simple ajax action (Taconite implementation), on a change of a combobox,
another is populated depending the value selected in the first one.
Here is my webtest script :
<setselectfield name="zone" optionIndex="1"/>
<sleep description="pause for 5 sec" seconds="5"/> // Waiting the ajax rendering
of the second combobox
<clickButton description="Submit the form" label="${actions.add}" />
Here is the error :
INFO (com.canoo.webtest.steps.Step) - Start Step: setselectfield "<unknown>"
(8/12)
INFO (com.canoo.webtest.engine.Context) - Current form set to
(action=addCountryToUser.html)
INFO (com.canoo.webtest.steps.Step) - Start Step: sleep "pause for 5 sec" (8/12)
INFO (com.canoo.webtest.extension.Sleep) - Sleeping for 5000 milliseconds
INFO (com.canoo.webtest.engine.Context) - Content of window changed to
http://localhost:8080/xxx/ajax/combobox.html?targetId=country&ts=1133965936390&zone=1
INFO (com.canoo.webtest.engine.Context) - Webclient:
com.gargoylesoftware.htmlunit.WebClient@ba5c7a
INFO (com.canoo.webtest.engine.Context) - script engine:
com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine@10d593e
INFO (com.canoo.webtest.engine.Context) - Content of current window changed, it
will become current response
INFO (com.canoo.webtest.engine.Context) - Current form set to none
INFO (com.canoo.webtest.engine.Context) - Changed last response to
http://localhost:8080/xxx/ajax/combobox.html?targetId=country&ts=1133965936390&zone=1
Exception in thread "XMLHttpRequest.send() Thread"
org.mozilla.javascript.EvaluatorException: La classe Java
"com.sun.org.apache.xerces.internal.dom.DeferredElementImpl" ne possède aucun
champ ou aucune méthode d'instance publique appelé "0"
(/afvp/scripts/taconite-client.js#268)
at
org.mozilla.javascript.DefaultErrorReporter.runtimeError(DefaultErrorReporter.java:95)
at org.mozilla.javascript.Context.reportRuntimeError(Context.java:966)
at org.mozilla.javascript.Context.reportRuntimeError(Context.java:1022)
at org.mozilla.javascript.Context.reportRuntimeError2(Context.java:992)
at org.mozilla.javascript.JavaMembers.reportMemberNotFound(JavaMembers.java:635)
at org.mozilla.javascript.NativeJavaObject.get(NativeJavaObject.java:106)
at
org.mozilla.javascript.ScriptableObject.getProperty(ScriptableObject.java:1340)
at org.mozilla.javascript.ScriptRuntime.getObjectElem(ScriptRuntime.java:1301)
at org.mozilla.javascript.ScriptRuntime.getObjectElem(ScriptRuntime.java:1285)
at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:2845)
at script(/afvp/scripts/taconite-client.js:268)
at script(/afvp/scripts/taconite-client.js:225)
at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2250)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:149)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:337)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:2755)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:147)
at
com.gargoylesoftware.htmlunit.javascript.host.XMLHttpRequest.setState(XMLHttpRequest.java:127)
at
com.gargoylesoftware.htmlunit.javascript.host.XMLHttpRequest.doSend(XMLHttpRequest.java:340)
at
com.gargoylesoftware.htmlunit.javascript.host.XMLHttpRequest.access$0(XMLHttpRequest.java:323)
at
com.gargoylesoftware.htmlunit.javascript.host.XMLHttpRequest$1.run(XMLHttpRequest.java:302)
INFO (com.canoo.webtest.steps.Step) - Start Step: clickButton "Soumet le
formulaire" (8/12)
INFO (com.canoo.webtest.steps.request.AbstractTargetAction) - -> gotoTarget by
clickButton with name: null
INFO (com.canoo.webtest.steps.Step) - Exception thrown from this class:
com.canoo.webtest.engine.StepExecutionException
INFO (com.canoo.webtest.steps.Step) - Message was: Last response is not an HTML
page but of type text/xml
INFO (com.canoo.webtest.steps.Step) - Exception thrown from this class:
com.canoo.webtest.engine.StepExecutionException
INFO (com.canoo.webtest.steps.Step) - Message was: Last response is not an HTML
page but of type text/xml
INFO (com.canoo.webtest.steps.Step) - Exception thrown from this class:
com.canoo.webtest.engine.StepExecutionException
INFO (com.canoo.webtest.steps.Step) - Message was: Last response is not an HTML
page but of type text/xml
INFO (com.canoo.webtest.ant.WebtestTask) - Writing report using Report class:
com.canoo.webtest.reporting.XmlReporter
INFO (com.canoo.webtest.ant.WebtestTask) - Test summary successfully created.
I can point out that manually everything works perfectly, so its clearly a
problem with canoo web test/htmlunit.
I dont know if it's a problem of javascript support or a response changed to xml
(response to the ajax action) ?
Have you any pointers?
Thank you a lot. Richard
_______________________________________________ WebTest mailing list WebT...@lists.canoo.com http://lists.canoo.com/mailman/listinfo/webtest
_______________________________________________ WebTest mailing list WebT...@lists.canoo.com http://lists.canoo.com/mailman/listinfo/webtest




