How to use WATIR in IRB
Published in
Feb 1, 2022
Using WATIR (Web Application Testing In Ruby) in IRB (Interactive Ruby) can be quite useful when trying to build a test script, it can make writing a script much faster. Here’s how to do it:
Open up the Terminal/Command-line interface and type the following:
irbrequire 'watir'browser = Watir::Browser.new
A browser window should have opened up. Now you can execute any of the WATIR commands in the Terminal/CLI to continue building your script!