[Webtest] [dev] How to specify the browser to simulate for js support
Dierk Koenig
webtest@lists.canoo.com
Wed, 10 Nov 2004 18:59:57 +0100
a sidemark:
I noticed the nested <option> tags are not longer processed but
still possible to set. We should remove setOption() from the
config then.
How do we process options in the future?
What about e.g. enabling/disabling JavaScript processing?
Any ideas?
cheers
Mittie
> -----Original Message-----
> From: webtest-admin@lists.canoo.com
> [mailto:webtest-admin@lists.canoo.com]On Behalf Of Marc Guillemot
> Sent: Mittwoch, 10. November 2004 16:21
> To: webtest@lists.canoo.com
> Subject: [Webtest] [dev] How to specify the browser to simulate for js
> support
>
>
> Hi,
>
> htmlunit has the nice feature to allow to test some browser
> specific javascript code. This means for instance that
> expression like "document.all" will not evaluate the same
> depending on the browser that htmlunit simulates.
>
> As we didn't have such a notion in previous version of webtest,
> I've introduced the following behavior based on the
> user-agent header set with <header> tag of <config>:
> - if it contains the string "Netscape", simulate - as of htmlunit
> - Netscape 6.2.3
> - else if it contains the string "Gecko", simulate - as of
> htmlunit - Mozilla 1.0
> - else simulate - as of htmlunit - MS IE 6.0
>
> This allowed me in a first time to quickly migrate the "header"
> functionnality without beeing "too" wrong. I think now
> that we should perhaps provide a finer way to control this
> settings from a test script. For htmlunit, a "BrowserVersion"
> object has following properties:
> - applicationName - The name of the application
> - applicationVersion - The version string of the application
> - userAgent - The user agent string that will be sent to the server
> - javaScriptVersion - The version of JavaScript
>
> What do you think?
>
> Marc.
>
> _______________________________________________
> WebTest mailing list
> WebTest@lists.canoo.com
> http://lists.canoo.com/mailman/listinfo/webtest
>