[chromedriver] Fix package installation
This commit alllows us to switch to JSON endpoints for chromedriver since upstream changed the way of installation for version 115 or newer: https://chromedriver.chromium.org/downloads#h.p_ID_32 https://github.com/GoogleChromeLabs/chrome-for-testing#json-api-endpoints Change-Id: I4a432ec36fe9e3f794cc6b7788bbdc04db3c8cf6
This commit is contained in:
@@ -25,6 +25,7 @@
|
|||||||
- unzip
|
- unzip
|
||||||
- wget
|
- wget
|
||||||
- xvfb
|
- xvfb
|
||||||
|
- jq
|
||||||
|
|
||||||
- name: Install selenium
|
- name: Install selenium
|
||||||
pip:
|
pip:
|
||||||
@@ -55,8 +56,8 @@
|
|||||||
shell: |-
|
shell: |-
|
||||||
set -ex
|
set -ex
|
||||||
CHROME_VERSION=$(dpkg -s google-chrome-stable | grep -Po '(?<=^Version: ).*' | awk -F'.' '{print $1"."$2"."$3}')
|
CHROME_VERSION=$(dpkg -s google-chrome-stable | grep -Po '(?<=^Version: ).*' | awk -F'.' '{print $1"."$2"."$3}')
|
||||||
DRIVER_PATH=$(wget -qO- https://chromedriver.storage.googleapis.com | grep -Po "(?<=<Key>)${CHROME_VERSION}[^<]*?chromedriver_linux64\.zip(?=</Key>)" | tail -1)
|
DRIVER_URL=$(wget -qO- https://googlechromelabs.github.io/chrome-for-testing/last-known-good-versions-with-downloads.json | jq -r --arg chrome_version "$CHROME_VERSION" '.channels.Stable.downloads.chrome[] | select(.platform=="linux64" and (.url | test($chrome_version))).url')
|
||||||
wget -O /tmp/chromedriver.zip "https://chromedriver.storage.googleapis.com/${DRIVER_PATH}"
|
wget -O /tmp/chromedriver.zip ${DRIVER_URL}
|
||||||
args:
|
args:
|
||||||
executable: /bin/bash
|
executable: /bin/bash
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user