[Webtest] Canoo v1.6 build 544 (httpunit 1.6) Javascript Support?
Marc Guillemot
webtest@lists.canoo.com
Tue, 14 Dec 2004 14:39:37 +0100
Concerning Date(), you're right: rhino complies to ECMA standard like Mozilla/Firefox but not IE. But the DOM objects
are the job of htmlunit not of rhino. There are probably more IE specific objects/methods that are configured to work
with rhino therefore I would rather say that the javascript support of htmlunit is closer to IE than to Mozilla/Firefox.
Marc.
Paul King wrote:
> Marc Guillemot wrote:
>
>> Paul King wrote:
>>
>>> ...
>>> The JavaScript engine that webtest uses is closer to Mozilla/Firefox
>>> than IE. Does your page work in all browsers? Perhaps an explicit
>>> "return true" or "form.submit()" in your JavaScript might help.
>>
>>
>>
>> what do you mean with closer to Mozilla/Firefox than IE?
>
>
> HtmlUnit and HttpUnit both use the Rhino JS engine from Mozilla. Rhino
> has numerous differences compared with IE's JScript support. Most of the
> differences are at the DOM level and HtmlUnit does a better job of
> supporting those differences - at the moment it supplies a better set of
> browser specific host objects than HttpUnit but still not all of the
> "special" things that are in IE. There are also language differences in
> addition to DOM differences, for example:
>
> Doing 'alert("Year is " + new Date().getYear())' in some JavaScript in
> webtest (HttpUnit or HtmlUnit versions) or Firefox or Mozilla yields
> "Year is 104". This is as per the ECMA script which by the way is not
> Y2K compliant - hence the strange result. IE produces "Year is 2004" -
> what you expect but not compliant. BTW: using getFullYear() is the ECMA
> function which is Y2K compliant - and luckily is supported by IE too!
>
> For more details of the above and other examples, see:
>
> http://nexgenmedia.net/evang/iemozguide/#javascript_differences
>
> Other parts of the above page also detail some of the DOM and event
> differences between the browsers.
>
> Cheers,
>
> Paul.
> _______________________________________________
> WebTest mailing list
> WebTest@lists.canoo.com
> http://lists.canoo.com/mailman/listinfo/webtest
>