Dashboard > Watir > ... > Tutorial > Run the Watir Unit Tests
Watir Log In View a printable version of the current page.
Run the Watir Unit Tests
Added by Alan Baird, last edited by Bret Pettichord on Jul 10, 2008  (view change) show comment
Labels: 
(None)

Unit Tests

If you are following the Quick Start Guide, this section is not necessary to get up and running

Running the Unit Tests

After you have installed Ruby and Watir, you can run the unit tests to verify the installation.

To run the unit tests:

  • If you have installed Ruby in its default folder of "C:\Ruby" then in "SciTE" goto:
C:\ruby\lib\ruby\gems\1.8\gems\watir-1.5.x\unittests\core_tests.rb

And press "F5"

  • The tests should all run and pass.
  • If you receive any errors, try updating your gems with:
gem update

Having Problems?

Running on Windows XP and Internet Explorer prevents you from running the unit tests? If you are using Windows XP with Service Pack 2, you may not be able to run the tests unless you enable active content.

If the website you are testing has active content, the IE browser will block the content. To enable active content perform the following:

  • From the browser, select Tools > Internet Options
  • Select the Advanced tab
  • Under Security, check Allow active content to run in files on My Computer
  • Click OK

There is more information on allowing active content.

Warning! Allowing active content to run in files on your computer is a security risk. You only need that enabled for running unit tests. Do not forget to disable it after unit tests are finished.

Additional Problems

  • If you have the google toolbar installed, you will need to turn off the popup blocker.
  • If you are installing on a new system, you will get a dialog asking about auto-complete. You will have to answer this question before you can run the unit tests.
Watir Tutorial
< previous page :: Installation :: next page>
Quick Start Guide
Continue at Install Internet Explorer Developer Toolbar.

Site running on a free Atlassian Confluence Community License granted to OpenQA. Evaluate Confluence today.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.5.6 Build:#812 Aug 06, 2007) - Bug/feature request - Contact Administrators