[Webtest] [dev] How to specify the browser to simulate for js support
Matt Raible
webtest@lists.canoo.com
Wed, 10 Nov 2004 09:23:32 -0700
I think browser name and version are sufficient, since that is what
most folks know. I can see a need for user-agent, but the JavaScript
version probably should be implicit based on the browser version.
Matt
On Nov 10, 2004, at 8:21 AM, Marc Guillemot wrote:
> 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