Skip to content

Commit 0d6ec72

Browse files
committed
Install chrome driver for current chrome version
1 parent e86b3a4 commit 0d6ec72

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

.travis.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@ language: ruby
33
sudo: required
44
addons:
55
chrome: stable
6-
apt:
7-
packages:
8-
- dpkg
9-
- chromium-chromedriver
106

117
# We deviate from the rspec-dev cache setting here.
128
#
@@ -29,6 +25,7 @@ cache: bundler
2925
bundler_args: "--binstubs --path ../bundle --retry=3 --jobs=3"
3026

3127
before_install:
28+
- script/install_chrome_driver
3229
- script/update_rubygems_and_install_bundler
3330
- script/clone_all_rspec_repos
3431

script/install_chrome_driver

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
3+
CHROME_VERSION=$(google-chrome --version | grep -iE "[0-9.]{10,20}" | sed -E "s/.* ([0-9]+)\.[0-9]+\.[0-9]+\..*/\1/")
4+
echo $CHROME_VERSION
5+
6+
LATEST=$(curl https://chromedriver.storage.googleapis.com/LATEST_RELEASE_$CHROME_VERSION)
7+
echo $LATEST
8+
9+
curl "https://chromedriver.storage.googleapis.com/$LATEST/chromedriver_linux64.zip" > chromedriver_linux64.zip
10+
11+
unzip chromedriver_linux64.zip
12+
mv chromedriver ~/bin/chromedriver

0 commit comments

Comments
 (0)