commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oliver Chua" <oliverc...@softhome.net>
Subject Re: Incompatible Validation Javascript with JWebunit
Date Thu, 14 Oct 2004 06:44:37 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
1.
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
support,
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...

Oliver


----- Original Message ----- 
From: "Martin Cooper" <mfncooper@gmail.com>
To: "Jakarta Commons Users List" <commons-user@jakarta.apache.org>
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 <oliverchua@softhome.net>
wrote:
> > 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
can
> > 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
validator.
> > 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: commons-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: commons-user-help@jakarta.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message