chromedriver-helper is no longer supported. If you try to install it or upgrade to a newer version, you’ll be greeted with this announcement:
This switch is a good move overall. webdrivers provides support for non-Chrome browsers, and is more actively maintained. And, from my experience, making the switch is mostly a one-line replacement. Open your Gemfile and make the swap:
Since webdrivers brings in selenium-webdriver as a dependency, I’ve been removing it from my apps’ own explicit dependencies. If you use Spring, you may need to stop it with
bin/spring stop, then run your tests as usual. Assuming things were working before with chromedriver-helper, they should continue to work using webdrivers.
The only exception I’ve found to that is on a computer where I had a dev channel version of Chrome installed. While working to upgrade the source for my book, I ran into the following failure:
At first glance, I thought my app was returning a 404 for some reason, but that didn’t make sense. After digging into the gem’s source, I found the 404 was coming from Google’s servers, attempting to download the latest ChromeDriver version from the dev channel. I was on a tight schedule, and replacing my dev channel Chrome with a standard install fixed the issue. (This may have been solved by now; I’ll dig back in and update this post accordingly as I know more.)
I’ve also read about issues using webdrivers alongside VCR. I didn’t run into these issues myself, but workarounds are now documented.
If you liked my series on practical advice for adding reliable tests to your Rails apps, check out the expanded ebook version. Lots of additional, exclusive content and a complete sample Rails application.
Ruby on Rails news and tips, and other ideas and surprises from Aaron at Everyday Rails. Delivered to your inbox on no particular set schedule.