Step 2. Select and Install Browser Driver Tool(s)
A lot of tools exist in this space, but the main choice is between headless browser emulators and tools that drive real browsers. Modern browsers are getting better in supporting web standards and cross-browser compatibility, but does your application need to be tested in multiple browsers, including IE 7 or even IE 6? Thought so.
Watir is a very mature browser driver originally written to drive IE. Watir ecosystem grew to support other major browsers, but it drives IE especially well under both administrative and non-administrative Windows accounts and requires zero IE configuration. Its Firefox flavor, FireWatir does require installing a Firefox extension. The only problem I have run into with Watir 1.7-1.8/IE was occasional timeouts and other problems with closing browser windows. The other caveat to keep in mind is that Watir does not work yet under Ruby 1.9.x.
Selenium WebDriver is the main driver of Selenium 2, and it is intended to be the main future driver of the Watir project. It drives Firefox with no problems whatsoever and requires zero Firefox configuration. IE driving via WebDriver has some issues currently.
Watir-WebDriver is Watir API library on top of WebDriver. It is not, unfortunately, 100% compatible with Watir, but it is largely compatible and incompatibilities could be patched in your code thanks to Ruby’s open classes.
My choice: Watir to drive IE, Watir-WebDriver to drive Firefox
Other choices: Selenium, Canoo WebTest, Capybara (with additional choice of drivers), etc.
What to do:
- Windows, for driving IE: Install Watir.
>gem install watir
- For driving Firefox:
- Firefox must be installed in the default location or added to the PATH.
- Install Watir-WebDriver:
>gem install watir-webdriver
[…] Posted at a personal blog Add to […]