Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Download latest Selenium Standalone Server (shell script)
#!/usr/bin/env bash
# Corey Goldberg 2018
# download latest release of Selenium Standalone Server
# requires:
# * `curl`
# * `xpath` utility from the `XML::XPath` Perl module. On Debian,
# this is provided by the `libxml-xpath-perl` package.
download-selenium-server () {
local baseurl=""
local latest=$(curl -sS "$baseurl" | xpath -q -e "./ListBucketResult/Contents/Key/text()" |
grep "selenium-server-standalone" | sort -V | tail -n 1)
local url="${baseurl}/${latest}"
local filename=$(basename "$url")
echo "Downloading: ${filename}"
curl -O# "$url"
chmod +x "$filename"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment