Skip to content

Commit 7b7e27e

Browse files
committed
WIP: Run tests with chromedriver
1 parent 0eb163b commit 7b7e27e

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

.travis.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,17 @@ rust:
33
- stable
44
- beta
55
- nightly
6+
# chrome sandbox fails to run without this https://github.com/travis-ci/travis-ci/issues/7150
7+
sudo: required
68
addons:
79
# Force the latest firefox, otherwise we get and old ESR version
810
# that we dont even support
911
firefox: latest
12+
chrome: stable
1013
apt:
1114
packages:
1215
- firefox
16+
- google-chrome-stable
1317
- xvfb
1418
before_script:
1519
# start xvfb and firefox to run the tests
@@ -21,5 +25,10 @@ before_script:
2125
- bin/download_geckodriver
2226
- export PATH=$PATH:$HOME/.cargo/bin:$PWD/bin
2327
- which geckodriver
28+
# install chromedriver
29+
- bin/download_chromedriver
30+
- export CHROME_BIN=/usr/bin/google-chrome-stable
31+
- export CHROME_HEADLESS=1
32+
- which chromedriver
2433
script:
2534
- RUST_LOG="webdriver=trace" cargo test --verbose

bin/download_chromedriver

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/usr/bin/env bash
2+
set -ex
3+
4+
script_dir=$( cd $(dirname ${BASH_SOURCE[0]}); pwd )
5+
6+
version=$(wget -q -O - http://chromedriver.storage.googleapis.com/LATEST_RELEASE)
7+
8+
curl -sSL \
9+
http://chromedriver.storage.googleapis.com/$version/chromedriver_linux64.zip \
10+
-o ${script_dir}/chromedriver-linux64.zip
11+
unzip -d ${script_dir} ${script_dir}/chromedriver-linux64.zip
12+
chmod +x ${script_dir}/chromedriver

0 commit comments

Comments
 (0)