Skip to content
This repository was archived by the owner on Nov 6, 2023. It is now read-only.

Commit 7d614b0

Browse files
authored
Install the latest geckodriver for firefox (#19867)
* Install the latest geckodriver for firefox * Update setup_travis.sh
1 parent c7d1d3c commit 7d614b0

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

test/setup_travis.sh

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,14 @@ function setup_chrome {
1717
}
1818

1919
function setup_firefox {
20-
#version=$(curl -s https://api.github.com/repos/mozilla/geckodriver/releases/latest | grep tag_name | cut -d '"' -f 4)
21-
# hard-code latest version, since apparently the above `curl` is fucking up in travis
22-
version="v0.26.0"
23-
url="https://github.com/mozilla/geckodriver/releases/download/${version}/geckodriver-${version}-linux64.tar.gz"
24-
wget -O /tmp/geckodriver.tar.gz ${url}
20+
# install the latest version of geckodriver (per Github release API)
21+
firefox_version=$("${BROWSER}" -version)
22+
geckodriver_version=$(curl -s https://api.github.com/repos/mozilla/geckodriver/releases/latest | grep tag_name | cut -d '"' -f 4)
23+
geckodriver_url="https://github.com/mozilla/geckodriver/releases/download/${geckodriver_version}/geckodriver-${geckodriver_version}-linux64.tar.gz"
24+
25+
echo "Setting up geckodriver ${geckodriver_version} for ${firefox_version}"
26+
27+
wget -O /tmp/geckodriver.tar.gz ${geckodriver_url}
2528
sudo tar -xvf /tmp/geckodriver.tar.gz -C /usr/local/bin/
2629
sudo chmod a+x /usr/local/bin/geckodriver
2730
}

0 commit comments

Comments
 (0)