Anyone who has used Watir-WebDriver (or WebDriver for that matter) to test Google Chrome will know that it’s been pretty unreliable, and pretty much unusable in the past… until now.
The ChromeDriver executable was released recently which enables WebDriver to control Google Chrome natively using the Wire protocol. This means your Watir-WebDriver tests will run super fast, and super reliably.
For Mac OSX:
- Get the latest Watir-WebDriver gem
gem update watir-webdriver
- Download the ChromeDriver binary from the Chromium site, and copy it to your path (such as /usr/local/bin/)
- This will work with any current version of Chrome
- Change your Watir-WebDriver script to use
Watir::Browser.new :chromeand voila, super fast Chrome, with no weird first tab opened in the background. This is the key to tell if you’re doing it right, your app should appear in the first tab of Chrome, not the second.
I haven’t done this on Windows yet, so your mileage may vary, but I imagine it wouldn’t be too different.