What’s Watir? Read “Watir: Another sweetspot for Enterprise Ruby”
As you can see, you can reference the window object and use eval to execute your snippets. The easier way is to add this custom method for easy reference
class Watir::IE; def window; document.parentWindow; end; end
Then you can write the last example as:
Much more intuitive and straightforward. Thanks to my colleague Tobias for the trick.
- Justaddwater.dk: Watir: Another sweetspot for Enterprise Ruby (July 2006)
- DWatir for distributed testing is very promising. I saw the demo at RailsConf but had not yet a chance to use. More info in the code files.