BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Watir Adds Support for Modal Dialogs

Watir Adds Support for Modal Dialogs

Watir is a script processor for testing/automating web applications in Internet Explorer. It uses Ruby on Win32 to drive the browser via COM. FireWatir is an extension to WATiR that allows WATiR scripts written for IE to work with the FireFox browser as well, with little to no changes. Essentially, Watir gives you the ability to script your web browser in Ruby with a very easy-to-use API.

Users of Watir are very passionate about how great it is. Its users are primarily QA people comfortable with more programming-like approaches to testing, but has also been used in ways other than testing. For example, at ThoughtWorks, people have posted Watir scripts for both posting and verifying payment of expense reports using our internal web-based system.

Agile folks tend to love Watir too, because it can be used as the foundation for automated acceptance testing.

According to Brett Pettichord, testing expert and author of Watir:

About a year ago, it became clear that one of the major limitations of Watir was its lack of support for modal web dialogs. These are IE-specific popup windows that are drawn with the showModalDialog command. Unlike ordinary web popups, modals block access to the original web page until they are closed. You don't see them much on public web sites: they aren't compatable with non-IE browsers and and are arguably an example of poor user interface design. But they are very common with enterprise applications because they are easier to code. And these happen to be the kinds of applications that people often want to test with Watir.

Besides Rails, Watir is probably one of the most common first exposures of people to the Ruby language. If you have Ruby and RubyGems installed already, trying it out is as easy as typing gem install watir

Rate this Article

Adoption
Style

BT