Posted 6 months ago. Visible to the public.

chromedriver-helper gem in Gemfile might break you selenium tests (of other projects)

Summary: Don't add chromedriver-helper to the Gemfile

  • the executables might break your tests in projects where chromedriver-helper is not in the Gemfile
  • developers with different chrome versions will have problems using the same chromedriver-helper version

Background

If you install the chromedriver-helper gem, but don't have it in you Gemfile, your selenium tests might fail with:

Copy
Selenium::WebDriver::Error::WebDriverError: unable to connect to chromedriver 127.0.0.1:9515

The reason is that chromedriver-helper overrides the chromedriver path of you system:

Copy
which chromedriver /home/username/.rvm/gems/ruby-2.4.1/bin/chromedriver # instead of e.g. /home/username/bin/chromedriver

Setting WebDriver.logger.level = :debug will tell you then the reason why selenium-webdriver fails:

Copy
can't find executable chromedriver for gem chromedriver-helper. chromedriver-helper is not currently included in the bundle, perhaps you meant to add it to your Gemfile? (Gem::Exception)

Once an application no longer requires constant development, it needs periodic maintenance for stable and secure operation. makandra offers monthly maintenance contracts that let you focus on your business while we make sure the lights stay on.

Author of this card:

Avatar
Emanuel De
Last edit:
6 months ago
by Emanuel De
About this deck:
We are makandra and do test-driven, agile Ruby on Rails software development.
License for source code
Posted by Emanuel De to makandra dev