[macOS] install geckodriver from binaries for 10.13 (#2559)

* install geckodriver from binaries for hs

* unite add to path block

* minor comment change

* fix variable name

* jg -r instead of tr

* change geckourl
This commit is contained in:
Mikhail Timofeev
2021-01-27 11:54:20 +03:00
committed by GitHub
parent d23e37467d
commit df8a157caf

View File

@@ -4,10 +4,19 @@ source ~/utils/utils.sh
echo "Installing Firefox..."
brew install --cask firefox
echo "Installing Geckodriver..."
brew_smart_install "geckodriver"
# 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
echo "Add GECKOWEBDRIVER to bashrc..."
echo "export GECKOWEBDRIVER=$(brew --prefix geckodriver)/bin" >> "${HOME}/.bashrc"
echo "export GECKOWEBDRIVER=${geckoPath}" >> "${HOME}/.bashrc"
invoke_tests "Browsers" "Firefox"