Chromedriver on Travis-CI
google-chrome, selenium-chromedriver, travis-ci
Solution
There's an easier way to launch Chrome on Travis CI, simply specify google-chrome in addons/apt/sources and google-chrome-package in addons/apt/packages.
Here's my sample config for a better understanding:
sudo: required
dist: trusty
addons:
apt:
sources:
- google-chrome
packages:
- google-chrome-stable
language: node_js
node_js:
- "6"
cache:
directories: node_modules
branches:
only: master
before_script:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
- npm i -g npm@^3
- sleep 3
Problem
I am having trouble getting chromedriver on Travis-CI working for my project knockout-secure-binding. I am trying to use WebdriverJS to automate testing with Chrome, at the least. I noted that there seems to be some issues with chromedriver on Travis-CI, including: - http://github.com/travis-ci/travis-ci/issues/938 - http://github.com/travis-ci/travis-ci/issues/272 - https://code.google.com/p/chromedriver/issues/detail?id=308 The issue seems to be a variant of "chrome not reachable", and from what I can gather it requires an upstream engagement by Google to fix it. The details of the error are available through the Travis build log. No workaround is apparent, though one comment mentioned using `--no-sandbox`, but it is not clear where or how one would employ this in WebdriverJS. Any thoughts on this would be sincerely appreciated. —— Edit —— As a matter of interest I am using Sauce Labs in lieu of Chromedriver.