Hi folks, I was wondering if it is possible to test with httpunit an ajax application. I made a simple ajax application, but am stuck at the begining as i found not any material that deals with ajax and httpunit. My application is very simple, when i push a button, the DOM structure of the document is being modified(a panel is created with a simple textfield) problem is that i cannot say when the callback of the xml received is being fired.
Aside from that i cannot see a method to get my hands on the reference to the textfield to which i would then want to assign a value, since the textfield is dinamically added in the DOM structure and is not present in the html file.
I would very much like to hear from someone who has been succesfull at doing ajax application testing with httpunit, or to hear that it is not possible.
Thanks.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm also stuck testing Ajax applications with HttpUnit. As I get it there is a problem with the Rhino (the JavaScript engine HttpUnit uses). Rhino does not seem to support XMLHttpRequest.
There seems to be a way to say to Rhino engine that "if JavaScript calls XMLHttpRequest then use MyNewXMLHttpRequestHandler Java class instead", but I haven't managed to figure it out. There is a sample @ http://www-128.ibm.com/developerworks/webservices/library/ws-ajax1/ but I haven't found e4xutil.jar to test it out. And if I found the jar, I could test it in Rhino Shell, but how to do the stuff from HttpUnit itself?
I have an application that uses http://script.aculo.us/ Autocompleter (based on prototype.js). Also some simple XMLHttpRequests for filling selectboxes with options.
So, if anyone succeeds in testing applications with Ajax, please post here or write tiblu[AT-replace-with-@]hotmail dot com. All help is welcome!
Thanks!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi folks, I was wondering if it is possible to test with httpunit an ajax application. I made a simple ajax application, but am stuck at the begining as i found not any material that deals with ajax and httpunit. My application is very simple, when i push a button, the DOM structure of the document is being modified(a panel is created with a simple textfield) problem is that i cannot say when the callback of the xml received is being fired.
Aside from that i cannot see a method to get my hands on the reference to the textfield to which i would then want to assign a value, since the textfield is dinamically added in the DOM structure and is not present in the html file.
I would very much like to hear from someone who has been succesfull at doing ajax application testing with httpunit, or to hear that it is not possible.
Thanks.
I'm also stuck testing Ajax applications with HttpUnit. As I get it there is a problem with the Rhino (the JavaScript engine HttpUnit uses). Rhino does not seem to support XMLHttpRequest.
There seems to be a way to say to Rhino engine that "if JavaScript calls XMLHttpRequest then use MyNewXMLHttpRequestHandler Java class instead", but I haven't managed to figure it out. There is a sample @ http://www-128.ibm.com/developerworks/webservices/library/ws-ajax1/ but I haven't found e4xutil.jar to test it out. And if I found the jar, I could test it in Rhino Shell, but how to do the stuff from HttpUnit itself?
I have an application that uses http://script.aculo.us/ Autocompleter (based on prototype.js). Also some simple XMLHttpRequests for filling selectboxes with options.
So, if anyone succeeds in testing applications with Ajax, please post here or write tiblu[AT-replace-with-@]hotmail dot com. All help is welcome!
Thanks!