Download Geckodriver For Firefox Mac
#!/bin/bash |
# download and install latest geckodriver for linux or mac. |
# required for selenium to drive a firefox browser. |
install_dir='/usr/local/bin' |
json=$(curl -s https://api.github.com/repos/mozilla/geckodriver/releases/latest) |
if [[ $(uname)'Darwin' ]];then |
url=$(echo '$json' jq -r '.assets[].browser_download_url select(contains('macos'))') |
elif [[ $(uname)'Linux' ]];then |
url=$(echo '$json' jq -r '.assets[].browser_download_url select(contains('linux64'))') |
else |
echo'can't determine OS' |
exit 1 |
fi |
curl -s -L '$url' tar -xz |
chmod +x geckodriver |
sudo mv geckodriver '$install_dir' |
echo'installed geckodriver binary in $install_dir' |
Aug 14, 2017 geckodriver is not yet feature complete.Support is best in Firefox 54 and greater, generally the more recent the Firefox version, the better the experience as they have more bug fixes and features. Some features will only be available in the most recent Firefox versions, and we strongly advise using the latest Firefox Nightly with geckodriver.
commented Sep 12, 2017
Thank you. |
commented Oct 9, 2017 • edited
edited
Hi, thanks for this script! Very helpful. I copied and used it for Chromedriver as well, here it is: I'll create a gist with both and quote you as the source, thanks! EDIT: Here is the gist https://gist.github.com/diemol/635f450672b5bf80420d595ca0016d20 |
commented Feb 2, 2018
Before I could run this script, I had to install jq. FYI: |
commented Feb 11, 2018
put |
commented Apr 18, 2018
You could also use Python: |
commented Jun 23, 2018 • edited
edited
commented Jul 20, 2018 • edited
edited
Working in Ubuntu 18.04. @Jambon1510 :
Well, you might be on a 32-bit machine. Try changing |
commented Jan 14, 2020
Without using (The tar checkpoint option is to print dots progress) |
commented Jan 15, 2020
For chrome driver, it is a ZIP not GZ archive, so you can use JAR command to extract: |
commented Mar 6, 2020
Thanks for sharing! |