commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oliver Chua" <>
Subject Re: Incompatible Validation Javascript with JWebunit
Date Thu, 14 Oct 2004 06:43:58 GMT
Sorry for not being clear.
JWebUnit (http unit testing framework) throws an Exception when it reads the
page containing the
javascript with the getAttributeNode function.

Yes, I think you're right about the function being part of the W3C DOM Level
And yes, it works fine on Internet Explorer.

jWebUnit depends on HttpUnit, which in turn depends on Rhino,
which is responsible for parsing javascript code.
Given this scenario, It's easy to see how JWebUnit can lag behind on
javascript support.
I don't think support for the getAttributeNode function is forthcoming.

For me to be able to maintain our web application (and to keep my sanity),
I need to be able to create and run http unit tests on our web app.
Since I'm pretty much stuck with jWebUnit with its 'outdated' javascript
is there some kind of workaround?

I'm thinking a backward compatible version of the validator script that
is similar to the one used in Struts1.1...


----- Original Message ----- 
From: "Martin Cooper" <>
To: "Jakarta Commons Users List" <>
Sent: Thursday, October 14, 2004 12:23 PM
Subject: Re: Incompatible Validation Javascript with JWebunit

> On Tue, 12 Oct 2004 18:06:55 +0800, Oliver Chua <>
> > I've recently migrated from Struts 1.1 to Struts 1.2.4
> > I'm using jwebUnit for functional testing of my struts app.
> > (JwebUnit 1.2 dependent on HttpUnit 1.5.4 and Rhino 1.5R4.1 I think)
> >
> > After I migrated, some of my functional tests failed.
> > It objects to the getAttributeNode method in the generated javascript.
> What is the "it" you are referring to that is objecting? The
> getAttributeNode() function is part of the W3C DOM Level 1, and is
> supported by all of the major browsers.
> --
> Martin Cooper
> > This is for the part that is generated when the javascript attribute
> > is set to true. (i.e.  function validateFloatRange(form), etc. )
> >
> > There is no issue when using Internet Explorer, as its javascript engine
> > handle it.
> > However, to make my JWebUnit tests run, I have to turn off javascript.
> > I realize this is the new version of the javascript part of the
> > But, is there a way to make the static javascript part compatible with
> > jWebUnit, maybe the old version will stil work when plugged in?
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > For additional commands, e-mail:
> >
> >
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message