2020-10-23 17:59:08 +03:00
|
|
|
#!/bin/bash -e -o pipefail
|
2020-12-28 10:54:25 +03:00
|
|
|
source ~/utils/utils.sh
|
2020-10-23 17:59:08 +03:00
|
|
|
|
2020-09-10 14:34:08 +03:00
|
|
|
echo "Installing Firefox..."
|
2020-12-22 14:48:31 +07:00
|
|
|
brew install --cask firefox
|
2020-09-10 14:34:08 +03:00
|
|
|
|
2021-01-27 11:54:20 +03:00
|
|
|
# High Sierra builds driver from sources, and it takes about 2 hours. It's much faster to download the binary directly
|
|
|
|
|
if ! is_HighSierra; then
|
|
|
|
|
echo "Installing Geckodriver..."
|
|
|
|
|
brew_smart_install "geckodriver"
|
|
|
|
|
geckoPath="$(brew --prefix geckodriver)/bin"
|
|
|
|
|
else
|
|
|
|
|
geckoUrl="$(curl -s https://api.github.com/repos/mozilla/geckodriver/releases/latest | jq -r '.assets[].browser_download_url | select(endswith("macos.tar.gz"))')"
|
|
|
|
|
download_with_retries $geckoUrl "/tmp" "geckodriver.tar.gz"
|
|
|
|
|
geckoPath="/usr/local/bin"
|
|
|
|
|
tar -xzf /tmp/geckodriver.tar.gz -C $geckoPath
|
|
|
|
|
fi
|
2020-09-10 14:34:08 +03:00
|
|
|
|
|
|
|
|
echo "Add GECKOWEBDRIVER to bashrc..."
|
2021-01-27 11:54:20 +03:00
|
|
|
echo "export GECKOWEBDRIVER=${geckoPath}" >> "${HOME}/.bashrc"
|
2020-12-17 19:37:19 +07:00
|
|
|
|
2021-01-22 09:26:28 +03:00
|
|
|
invoke_tests "Browsers" "Firefox"
|