Issue with Chromedriver when upgrading to Circle2.0


#1

Hello,

We are seeing the below error in Circle CI run for the specs ( ROR project ) when using chrome. Can someone please look into the issue and suggest ways to resolve it?
Below is the error.
Selenium::WebDriver::Error::WebDriverError:
Unable to find chromedriver. Please download the server from http://chromedriver.storage.googleapis.com/index.html and place it somewhere on your PATH. More info at https://github.com/SeleniumHQ/selenium/wiki/ChromeDriver.

sample copy of .circleci/config.yml:

jobs:
  build:
    docker:
      - image: circleci/ruby:2.4.2-node
        environment:
          PGHOST: 127.0.0.1
          CI: true
          CIRCLECI: true
          RAILS_ENV: test
          CI_REPORTS: ${CIRCLE_TEST_REPORTS}/rspec
          WAIT_TIME: 3
          PGUSER: root
      - image: redis:3.2.5
      - image: circleci/postgres:9.5.6-alpine
      - image: selenium/standalone-chrome:3.5.1
      - image: selenium/standalone-firefox:latest
      - image: circleci/node:6-browsers
        environment:
          CHROME_BIN: "/usr/bin/google-chrome"

    steps:
      - checkout
      - restore_cache:
          key: Gemfile-{{ checksum "Gemfile.lock" }}
      - run: bundle install --path vendor/bundle
      - save_cache:
          key: Gemfile-{{ checksum "Gemfile.lock" }}
          paths:
            - vendor/bundle
      - run: bundle exec rake db:reset
      
      # - restore_cache:
      #     key: phantomjs-2-1-1
      - run:
          name: Install PhantomJS
          command: |
            [ -f /usr/local/bin/phantomjs ] || wget -O /tmp/phantomjs.tar.bz2 https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2
            [ -f /usr/local/bin/phantomjs ] || tar -xjf /tmp/phantomjs.tar.bz2 -C /tmp
            [ -f /usr/local/bin/phantomjs ] || sudo mv /tmp/phantomjs-2.1.1-linux-x86_64/bin/phantomjs /usr/local/bin/phantomjs
      # - save_cache:
      #       key: phantomjs-2-1-1
      #       paths:
      #         - /usr/local/bin/phantomjs
      - run:
          command: |
            if [ $CIRCLE_BRANCH = 'master' ]; then 
              bundle exec rake push_ci:librato; 
            else
              bundle exec rspec
            fi

capybara config:

    config.app_host = 'https://test.google.com'
    config.server_port = 22345 + ENV['TEST_ENV_NUMBER'].to_i # rubocop:disable all
  end

  config.run_server        = (ENV['REMOTE'] || Rails.env.staging? || Rails.env.integration?) ? false : true
  config.default_driver    = ENV['REMOTE_DRIVER'] ? CapybaraRemoteDriver.instance.name : driver
  config.javascript_driver = :selenium
  config.default_max_wait_time = env_wait_time || 1
  config.raise_server_errors = false
end

Capybara.register_driver :selenium do |app|
  Capybara::Selenium::Driver.new(app, browser: :chrome, args: ['--disable-infobars'])
end

#2

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.