Hi Patrick. I would not try to use jWebUnit to unit test a javascript function - much too painful. HttpUnit/jWebUnit provide some javascript support, but it's very rough.
There are some javascript unit testing tools - I've not tried them myself, but there are some links at: http://opensourcetesting.org/unit_javascript.php Jim Jim Weaver Software Developer - ThoughtWorks Office : 615-850-4724 Cell : 312-286-7496 <patrick.scheuere [EMAIL PROTECTED]> Sent by: To jwebunit-users-ad <[EMAIL PROTECTED] [EMAIL PROTECTED] et> orge.net cc Subject 10/14/2004 07:17 [Jwebunit-users] Readonly form AM elements Hi everybody, We have some javascript calculations in our app and I would like to write some tests to confirm they work correctly. What I would like to do is the following: I have two fields, say fieldA and fieldB. If any of these fields looses focus (onblur), a javascript function is invoked. The script perfoms a calculation and writes the result in a third field, result. In my test I try the following: setFormElement("fieldA", "2.5"); setFormElement("fieldB", "1.75"); assertFormElementEquals("result", "4.375"); The form element into which the result is written looks like this: <input type="text" name="result" readonly> The call to assertFormElementEquals as stated above causes a TargetInvocationException. What am I doing wrong? TIA. Patrick Scheuerer Software Engineer Lufhansa Systems ------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl _______________________________________________ Jwebunit-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jwebunit-users ------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl _______________________________________________ Jwebunit-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jwebunit-users
