Selenium 2.0 (WebDriver) was released today, and with it came support for Opera. Since Watir-WebDriver uses the WebDriver bindings, it now supports Opera out of the box.
How to get it working
- First make sure you have the latest watir-webdriver (>0.2.5) and selenium-webdriver (>2.0.0) gems installed.
- Install Opera if you haven’t already
- Download the latest Selenium Standalone Server JAR files to your computer
- Create an Environment Variable named SELENIUM_SERVER_JAR and set it to the path to your standalone server JAR file
(On the mac, you can add something like this to your .bash_profile file:
- Open irb, require ‘watir-webdriver’, and type something like
b = Watir::Browser.new :opera
and ta-da: Opera automated testing.