Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Install geckodriver/chromedriver for Linux (64 bit)
#!/usr/bin/env bash
# Install WebDrivers for Linux
# ----------------------------
# * Binary webdrivers are required to drive Firefox and Chrome browsers from Selenium.
# * This script will fetch the 64-bit binaries (geckodriver/chromedriver) for Linux.
set -e
# geckodriver
json=$(curl -s
geckodriver_url=$(echo "$json" | jq -r '.assets[].browser_download_url | select(contains("linux64"))')
curl -s -L $geckodriver_url | tar -xz
chmod +x geckodriver
sudo mv geckodriver "$install_dir"
echo "latest geckodriver is now available in '$install_dir'"
# chromedriver
version=$(curl -s "$base_url/LATEST_RELEASE")
curl -sL -O# -o "$filename" "$chromedriver_url"
unzip -q "$filename"
rm "$filename"
chmod +x chromedriver
sudo mv chromedriver "$install_dir"
echo "latest chromedriver is now available in '$install_dir'"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment