Hi David,

> ...  
>  
> Problem #1
> Javascript errors  -  Controls that are incorporated to some of our
> webpages that are written in javascript cause errors when running the
> scripts and prevent us from saving pages.
>  
>  
> The error messages look like this:
> JavaScript error loading page
> _https://eaqa.jdas.deere.com/Base/Home.aspx?tabcode=HOME&bppik=1_
> <https://eaqa.jdas.deere.com/Base/Home.aspx?tabcode=HOME&bppik=1>
> : TypeError: Cannot find function extend in object function Object()
> { [native code for Object.Object, arity=1] } .
> (_https://eaqa.jdas.deere.com/ajaxpro/Jdas.Applications.ExtendAg.Base.UI.Pages_
> .Home,Jdas.Applications.ExtendAg.Base.UI.ashx#8)

as always for JS errors like this one, there are two possibilities:
- the error *exists* using the "real" browser that you simulate with
WebTest. In this case, +1 for WebTest as it allowed you to detect an
error in your application (which you can ignore if you want to)
- the error *doesn't exists* using the "real" browser that you simulate
with WebTest. In this case, -1 for WebTest as it means that simulation
was not so good here as it should be.

If you're in the second case, you can do following:
- upgrade to the latest WebTest build with, when it's compatible, the
latest HtmlUnit snapshot: if you're lucky, your problem has perhaps
already been fixed.
- if not, try to isolate the JS error to open an issue by WebTest or
HtmlUnit. This means provide the smallest amount of HTML & JS code
allowing to reproduce the problem. You really have to do it if you don't
want to face the problem for ever (or until the problem gets fixed
because someone encountered the same issue but was more courageous and
took the time to report it). Most of the time HtmlUnit's team is very
responsive: with a good failure report (and a not too complicated
problem), the problem may be fixed within a couple of hours!
- as long as it is not fixed, you can try to simulate an other browser.
The JS implementations of the different browsers differ and the maturity
of the HtmlUnit's simulation vary too. WebTest simulates IE6 by default,
but you can change it to FF2, FF3 or IE7.
- ignore the JS error and hack a workaround, for instance in Groovy, to
modify the browser content as it should have been done by the JS code.
This may be tricky as it requires to understand what this JS code is
doing. Be sure to have reported the JS problem if you don't want to live
with your hack for ever ;-)

Perhaps should I had such a doc to WebTest's website... ;-)

Cheers,
Marc.
-- 
Web: http://www.efficient-webtesting.com
Blog: http://mguillem.wordpress.com

_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest

Reply via email to