Skip to content

Commit 5fff216

Browse files
committed
fixed wrong chromedriver version
1 parent 7da3aa7 commit 5fff216

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

.travis.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,11 @@ env:
3131
before_install:
3232
- sudo apt-get -y install python3-pip python3-setuptools apache2-utils python3-venv jq
3333
- mkdir -p $HOME/.local/bin
34-
- CHROMEDRIVER_VERSION=$(curl -s https://googlechromelabs.github.io/chrome-for-testing/last-known-good-versions-with-downloads.json | jq -r '.channels.Stable.version')
34+
- CHROME_VERSION=$(google-chrome --version | awk '{print $3}')
35+
- echo "Installed Chrome version: $CHROME_VERSION"
36+
- CHROMEDRIVER_VERSION=$(curl -s "https://googlechromelabs.github.io/chrome-for-testing/known-good-versions-with-downloads.json" | jq -r --arg ver "$CHROME_VERSION" '.versions[] | select(.version == $ver) | .version' | head -1)
37+
- if [ -z "$CHROMEDRIVER_VERSION" ]; then echo "Exact version not found, using Chrome version directly"; CHROMEDRIVER_VERSION=$CHROME_VERSION; fi
38+
- echo "Using ChromeDriver version: $CHROMEDRIVER_VERSION"
3539
- wget https://storage.googleapis.com/chrome-for-testing-public/${CHROMEDRIVER_VERSION}/linux64/chromedriver-linux64.zip
3640
- unzip chromedriver-linux64.zip
3741
- mv chromedriver-linux64/chromedriver $HOME/.local/bin/chromedriver

0 commit comments

Comments
 (0)