Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Chromedriver edge case #285

Merged
merged 2 commits into from
Sep 26, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions bin/ci/before_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,20 @@ if [[ "$TRAVIS" ]]; then
# Install the PECL YAML parser for strict YAML parsing.
yes | pecl install yaml

# Install chromedriver.
# Install chromedriver following https://chromedriver.chromium.org/downloads/version-selection.
# Getting google chrome version.
TravisCarden marked this conversation as resolved.
Show resolved Hide resolved
CHROMEDRIVER="$( google-chrome-stable --version)"
echo "$CHROMEDRIVER"
CHROMEDRIVER_VERSION="$(echo "$CHROMEDRIVER" | awk '{print $3}')"
echo "$CHROMEDRIVER_VERSION"
wget -N https://chromedriver.storage.googleapis.com/${CHROMEDRIVER_VERSION}/chromedriver_linux64.zip -P ~/
echo "CHROMEDRIVER_VERSION=$CHROMEDRIVER_VERSION"
# Cut off last part from google chrome version.
TravisCarden marked this conversation as resolved.
Show resolved Hide resolved
CHROMEDRIVER_VERSION_FAMILY="$(echo "$CHROMEDRIVER_VERSION" | awk -F'.' '{print $1,$2,$3}' OFS='.' )"
echo "VERSION_FAMILY=$CHROMEDRIVER_VERSION_FAMILY"
# check latest_release
TravisCarden marked this conversation as resolved.
Show resolved Hide resolved
VERSION=$(curl -f --silent https://chromedriver.storage.googleapis.com/LATEST_RELEASE_${CHROMEDRIVER_VERSION_FAMILY})
echo "FINAL_VERSION=$VERSION"
# Download driver
TravisCarden marked this conversation as resolved.
Show resolved Hide resolved
wget -N https://chromedriver.storage.googleapis.com/${VERSION}/chromedriver_linux64.zip -P ~/
unzip ~/chromedriver_linux64.zip -d ~/
rm ~/chromedriver_linux64.zip
sudo mv -f ~/chromedriver /usr/local/share/
Expand Down