Monday, September 21, 2009

How to specify the browser that should be used in WebTest

In WebTest it is possible to define which browser shall be simulated. Currently WebTest support the following browsers:
  • Firefox3 (or FF3)
  • Firefox2 (or FF2)
  • InternetExplorer6 (or IE6)
  • InternetExplorer7 (or IE7)
To get a more detailed list, have a look at the WebTest config page (http://webtest.canoo.com/webtest/manual/config.html).

As you can see in the simple example below, it is very easy to define the simulated browser for your test:







'Here goes your test code...'







This example is an extract from a browser test of the self test suite of WebTest. For more details, have a look a the self test suite (https://svn.canoo.com/trunk/webtest/selftests/).

Enjoy :)

No comments: