File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3131before_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
You can’t perform that action at this time.
0 commit comments