> try to set in your application class
 > getPageSettings().setMultiWindowSupport(false) when testing

I tried this and it solved the problem about incorrect content of the 
Ajax Response. However, it does not solve the problem of the scripts 
error. After modifying mys scripts, I have now problem with wicket-ajax.js:

ERROR: error while processing response: InternalError: La classe Java 
"org.apache.xerces.dom.DeepNodeListImpl" ne possède aucun champ ou 
aucune méthode d'instance publique appelé "0" 
(http://localhost:8080/ceagrap/app/resources/wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax.js;jsessionid=604B48DD506D1BE949E53BB39A3F6F84#153).La
 
classe Java "org.apache.xerces.dom.DeepNodeListImpl" ne possède aucun 
champ ou aucune méthode d'instance publique appelé "0" 
(http://localhost:8080/ceagrap/app/resources/wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax.js;jsessionid=604B48DD506D1BE949E53BB39A3F6F84#153)

I do not know why the error message is in french (really not a good 
idea) but for those who do not understand this language, it means:

"The Java class "org.apache.xerces.dom.DeepNodeListImpl" do not have any 
public instance field or method with name "0".

Anyway, I will not investigate this any longer since I just downloaded 
Selenium :-)

Thanks,

Pierre-Yves

Matej Knopp a écrit :
> Pierre-Yves Saumont wrote:
>> Hello,
>>
>> I would be interested to hear about your experience in testing Wicket 
>> application, particularly using Ajax.
>>
>> My experience, after one week trying several solutions, is not so 
>> good. I tried jWebUnit and ad a lot of problems with scripts. So I 
>> "downgrade" to HtmlUnit to found that the javascript handling seems to 
>> be much different from what a normal browser do.
>>
>> One issue is that although an Ajax call would succeed in a normal 
>> browser, HtmlUnit reports an error in the onFailure handler. Either 
>> the Ajax call fails, or the failure handler is executed even if the 
>> call succeeds. Furthermore, HtmlUnit reports an error in the script 
>> although forcing the call to fail in a normal browser produces no error.
>>
>> There is a similar problem with some scripts that are linked to the 
>> page. Although they are not executed on page load by a normal browser, 
>> HtmlUnit reports an error in them. The error is the same in both 
>> cases: null browser objects like navigator.userAgent or window.location
> try to set in your application class 
> getPageSettings().setMultiWindowSupport(false) when testing
> 
> -Matej
>>
>> Another issue is that when an Ajax call succeeds (after removing the 
>> onFailure handler), the result that is received by HtmlUnit is not the 
>> same as in a normal browser, ie the response displayed through 
>> page.asXml() is completely different from what is displayed in the 
>> Ajax Debug Window. I can see that it is in fact a response to Wicket 
>> Ajax call, but the data is not correct. After the call, in a normal 
>> browser, the target components are updated. In HtmlUnit, they are not.
>>
>> Has anyone experienced such issues? Do yo think these are HtmlUnit 
>> issues only and has nothing to do with Wicket? Do you know better 
>> solutions for testing Ajax Wicket apps?
>>
>> Thanks
>>
>> Pierre-Yves
>>
>>
>> -------------------------------------------------------------------------
>> Using Tomcat but need to do more? Need to support web services, security?
>> Get stuff done quickly with pre-integrated technology to make your job 
>> easier
>> Download IBM WebSphere Application Server v.1.0.1 based on Apache 
>> Geronimo
>> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
>> _______________________________________________
>> Wicket-user mailing list
>> Wicket-user@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/wicket-user
>>
> 
> 
> 
> 


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to