tests: Use the latest version of geckodriver

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
Joseph Nuthalapati authored and Sunil Mohan Adapa committed 2020-01-30 13:39:22 -08:00
1 parent 932d2e17f9
commit 9769f48b89
1 file changed
+5 -2
+5 -2
View File
@@ -13,11 +13,14 @@ pip3 install splinter pytest-splinter pytest-bdd pytest-xvfb
echo "Installing geckodriver"
(
DL_DIR=/tmp/gecko
GECKO_VERSION="v0.26.0"
GECKO_VERSION=$(curl --silent "https://api.github.com/repos/mozilla/geckodriver/releases/latest" | grep -Po '"tag_name": "\K.*?(?=")')
FILENAME="geckodriver-${GECKO_VERSION}-linux64.tar.gz"
GECKO_URL="https://github.com/mozilla/geckodriver/releases/download/$GECKO_VERSION/$FILENAME"
test -e /usr/local/bin/geckodriver && echo "geckodriver already installed" && exit 0
test -e /usr/local/bin/geckodriver && \
test "$GECKO_VERSION" = "v$(geckodriver --version | head -1 | awk '{ print $2 }')" && \
echo "geckodriver already installed" && \
exit 0
mkdir -p $DL_DIR
cd $DL_DIR